metricsOverlay.model.metrics
Class IntegerRange

java.lang.Object
  extended by metricsOverlay.model.metrics.Range
      extended by metricsOverlay.model.metrics.IntegerRange
All Implemented Interfaces:
java.lang.Comparable<Range>, ITyped

public class IntegerRange
extends Range

An ordinal range using integer numbers. Note: This method does not check to make sure the max >= min

Version:
15/8/2009
Author:
Matthew Harward

Constructor Summary
IntegerRange()
          Parameterless constructor.
IntegerRange(int min, int max)
          Main constructor.
 
Method Summary
 java.lang.String getMax()
           
 java.lang.String getMin()
           
 java.lang.String getType()
           
 boolean isInRange(java.lang.String value)
           
 boolean isValid()
          Determines if the set range is valid.
 java.lang.String toString()
          Overriden toString method
 
Methods inherited from class metricsOverlay.model.metrics.Range
compareTo
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntegerRange

public IntegerRange()
Parameterless constructor. This should not be called.


IntegerRange

public IntegerRange(int min,
                    int max)
Main constructor.

Parameters:
min - the minimum value.
max - the maximum value.
Method Detail

getMax

public java.lang.String getMax()
Specified by:
getMax in class Range
Returns:
Abstract method, should be overriden to give a String representation of this range's max value.

getMin

public java.lang.String getMin()
Specified by:
getMin in class Range
Returns:
Abstract method, should be overriden to give a String representation of this range's min value.

isInRange

public boolean isInRange(java.lang.String value)
Specified by:
isInRange in class Range
Returns:
Abstract method, should be overriden to detect if a provided string value is within the required range.

isValid

public boolean isValid()
Description copied from class: Range
Determines if the set range is valid.

Specified by:
isValid in class Range
Returns:
true if valid, else false.

getType

public java.lang.String getType()
Specified by:
getType in interface ITyped
Specified by:
getType in class Range
Returns:
Abstract method, should be overriden to give a string representation of the name of the range type.

toString

public java.lang.String toString()
Description copied from class: Range
Overriden toString method

Overrides:
toString in class Range