Class Range

java.lang.Object
range.exercise.Range
All Implemented Interfaces:
Iterable<Integer>

public final class Range extends Object implements Iterable<Integer>
Author:
__STUDENT_NAME__, Finn Voichick, Dennis Cosgrove
  • Constructor Details

    • Range

      public Range(int min, int maxExclusive)
      Parameters:
      min - the inclusive lower bound
      maxExclusive - the exclusive upper bound
  • Method Details

    • min

      public int min()
      Gets the inclusive lower bound of the slice.
      Returns:
      inclusive lower bound of the slice
    • maxExclusive

      public int maxExclusive()
      Gets the exclusive upper bound of the slice.
      Returns:
      exclusive upper bound of the slice
    • iterator

      public Iterator<Integer> iterator()
      Specified by:
      iterator in interface Iterable<Integer>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object