Package adams.core.base
Class BaseList
- java.lang.Object
-
- adams.core.base.BaseObject
-
- adams.core.base.AbstractBaseString
-
- adams.core.base.BaseList
-
- All Implemented Interfaces:
CloneHandler<BaseObject>
,Serializable
,Comparable
- Direct Known Subclasses:
AttributeTypeList
public class BaseList extends AbstractBaseString
Wrapper for a comma-separated list (String).- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BaseList.Conversion
Enumeration for the conversion of the string, when setting it.
-
Field Summary
-
Fields inherited from class adams.core.base.BaseObject
m_Internal, m_Properties, SUFFIX_DISPLAY, SUFFIX_VALUE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
convert(String value)
Converts the string according to the specified conversion.protected BaseList.Conversion
getConversion()
Returns the conversion of the string before setting its value.String
getTipText()
Returns a tool tip for the GUI editor (ignored if null is returned).boolean
isValid(String value)
Checks whether the string value is a valid presentation for this class.String[]
listValue()
Returns the list items.-
Methods inherited from class adams.core.base.AbstractBaseString
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
-
-
-
-
Constructor Detail
-
BaseList
public BaseList()
Initializes the list with length 0.
-
BaseList
public BaseList(String s)
Initializes the object with the list to parse.- Parameters:
s
- the list to parse
-
-
Method Detail
-
getConversion
protected BaseList.Conversion getConversion()
Returns the conversion of the string before setting its value.- Returns:
- the type of conversion to apply
-
isValid
public boolean isValid(String value)
Checks whether the string value is a valid presentation for this class.- Overrides:
isValid
in classAbstractBaseString
- Parameters:
value
- the string value to check- Returns:
- always true
-
convert
protected String convert(String value)
Converts the string according to the specified conversion.- Overrides:
convert
in classAbstractBaseString
- Parameters:
value
- the string to convert- Returns:
- the converted string
- See Also:
getConversion()
-
listValue
public String[] listValue()
Returns the list items.- Returns:
- the list array
-
getTipText
public String getTipText()
Returns a tool tip for the GUI editor (ignored if null is returned).- Specified by:
getTipText
in classAbstractBaseString
- Returns:
- the tool tip
-
-