1 package tim.prune.data;
4 * Represents a range of integers, holding the maximum and
7 public class IntegerRange
9 private int _min = -1, _max = -1;
10 private boolean _foundValues = false;
14 * Clear for a new range calculation
25 * Add a value to the range
26 * @param inValue value to add
28 public void addValue(int inValue)
30 if (inValue < _min || !_foundValues) {
33 if (inValue > _max || !_foundValues) {
40 * @return true if any values added to the range
42 public boolean hasValues() {
47 * @return minimum value, or -1 if none found
49 public int getMinimum()
56 * @return maximum value, or -1 if none found
58 public int getMaximum()