Package adams.core.base
Class RangedThreshold
- java.lang.Object
-
- adams.core.base.BaseObject
-
- adams.core.base.AbstractBaseString
-
- adams.core.base.RangedThreshold
-
- All Implemented Interfaces:
CloneHandler<BaseObject>,Serializable,Comparable
public class RangedThreshold extends AbstractBaseString
For specifying thresholds for ranges.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRangedThreshold.ThresholdSpecificationContainer for storing min/max and threshold.
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT-
Fields inherited from class adams.core.base.BaseObject
m_Internal, m_Properties, SUFFIX_DISPLAY, SUFFIX_VALUE
-
-
Constructor Summary
Constructors Constructor Description RangedThreshold()Initializes the string with length 0.RangedThreshold(RangedThreshold.ThresholdSpecification t)Initializes the object with the threshold specification.RangedThreshold(RangedThreshold.ThresholdSpecification[] t)Initializes the object with the threshold specifications.RangedThreshold(String s)Initializes the object with the string to parse.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetTipText()Returns a tool tip for the GUI editor (ignored if null is returned).booleanisValid(String value)Checks whether the string value is a valid presentation for this class.protected RangedThreshold.ThresholdSpecification[]parse(String s)Parses the string into threshold specifications.RangedThreshold.ThresholdSpecification[]thresholdsValue()Returns the string as threshold specifications.-
Methods inherited from class adams.core.base.AbstractBaseString
convert, getValue, initialize, isEmpty, length, setValue, stringValue
-
Methods inherited from class adams.core.base.BaseObject
compareTo, equals, getClone, getInternal, getTemplates, getUnicode, hasFavoritesSupport, hashCode, isValidUnicode, newInstance, setUnicode, toObjectArray, toObjectArray, toString, toStringArray, toStringList
-
-
-
-
Field Detail
-
DEFAULT
public static final String DEFAULT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RangedThreshold
public RangedThreshold()
Initializes the string with length 0.
-
RangedThreshold
public RangedThreshold(String s)
Initializes the object with the string to parse.- Parameters:
s- the string to parse
-
RangedThreshold
public RangedThreshold(RangedThreshold.ThresholdSpecification t)
Initializes the object with the threshold specification.- Parameters:
t- the threshold spec
-
RangedThreshold
public RangedThreshold(RangedThreshold.ThresholdSpecification[] t)
Initializes the object with the threshold specifications.- Parameters:
t- the threshold specs
-
-
Method Detail
-
parse
protected RangedThreshold.ThresholdSpecification[] parse(String s) throws Exception
Parses the string into threshold specifications.- Parameters:
s- the string to parse- Returns:
- the specifications
- Throws:
Exception- if parsing fails
-
isValid
public boolean isValid(String value)
Checks whether the string value is a valid presentation for this class.- Overrides:
isValidin classAbstractBaseString- Parameters:
value- the string value to check- Returns:
- true if valid specification
-
thresholdsValue
public RangedThreshold.ThresholdSpecification[] thresholdsValue()
Returns the string as threshold specifications.- Returns:
- the specs
-
getTipText
public String getTipText()
Returns a tool tip for the GUI editor (ignored if null is returned).- Specified by:
getTipTextin classAbstractBaseString- Returns:
- the tool tip
-
-