Class ArraySearchBounds

java.lang.Object
org.sm.smtools.math.ArraySearchBounds

public final class ArraySearchBounds extends Object
The ArraySearchBounds class provides a container for storing a lower and upper array index.

Note that this class cannot be subclassed!

Version:
25/08/2011
Author:
Sven Maerivoet
  • Constructor Details

    • ArraySearchBounds

      public ArraySearchBounds()
      Constructs an ArraySearchBounds object with both bounds set to 0.
    • ArraySearchBounds

      public ArraySearchBounds(int lowerBound, int upperBound)
      Constructs an ArraySearchBounds object with both bounds specified.
      Parameters:
      lowerBound - the lower bound
      upperBound - the upper bound
  • Method Details

    • getLowerBound

      public int getLowerBound()
      Getter method for the lower bound.
      Returns:
      the lower bound
    • setLowerBound

      public void setLowerBound(int lowerBound)
      Setter method for the lower bound.
      Parameters:
      lowerBound - the lower bound
    • getUpperBound

      public int getUpperBound()
      Getter method for the upper bound.
      Returns:
      the upper bound
    • setUpperBound

      public void setUpperBound(int upperBound)
      Setter method for the upper bound.
      Parameters:
      upperBound - the upper bound
    • reset

      public void reset()
      Resets both boundary indices to 0.