Class ListUtils.PositiveIntBox

java.lang.Object
it.unimi.di.prog2.h23.ListUtils.PositiveIntBox
All Implemented Interfaces:
Comparable<ListUtils.PositiveIntBox>
Direct Known Subclasses:
ListUtils.AbsoluteValueIntBox
Enclosing class:
ListUtils

public static class ListUtils.PositiveIntBox extends Object implements Comparable<ListUtils.PositiveIntBox>
A box containing a positive integer.
  • Field Details

    • value

      private final int value
      The value in the box.
  • Constructor Details

    • PositiveIntBox

      public PositiveIntBox(int value)
      Creates a new box containing a positive integer.
      Parameters:
      value - the value.
      Throws:
      IllegalArgumentException - if value is not positive.
  • Method Details