Package org.sm.smtools.math
Class ArraySearchBounds
java.lang.Object
org.sm.smtools.math.ArraySearchBounds
public final class ArraySearchBounds
extends java.lang.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 Summary
Constructors Constructor Description ArraySearchBounds()
Constructs anArraySearchBounds
object with both bounds set to 0.ArraySearchBounds(int lowerBound, int upperBound)
Constructs anArraySearchBounds
object with both bounds specified. -
Method Summary
Modifier and Type Method Description int
getLowerBound()
Getter method for the lower bound.int
getUpperBound()
Getter method for the upper bound.void
reset()
Resets both boundary indices to 0.void
setLowerBound(int lowerBound)
Setter method for the lower bound.void
setUpperBound(int upperBound)
Setter method for the upper bound.Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ArraySearchBounds
public ArraySearchBounds()Constructs anArraySearchBounds
object with both bounds set to 0. -
ArraySearchBounds
public ArraySearchBounds(int lowerBound, int upperBound)Constructs anArraySearchBounds
object with both bounds specified.- Parameters:
lowerBound
- the lower boundupperBound
- 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.
-