Package adams.core
Class VariableName
- java.lang.Object
-
- adams.core.base.BaseObject
-
- adams.core.base.AbstractBaseString
-
- adams.core.VariableName
-
- All Implemented Interfaces:
CloneHandler<BaseObject>
,Serializable
,Comparable
- Direct Known Subclasses:
VariableNameNoUpdate
public class VariableName extends AbstractBaseString
Wrapper around the name of a variable (= string).- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT
the default value.-
Fields inherited from class adams.core.base.BaseObject
m_Internal, m_Properties, SUFFIX_DISPLAY, SUFFIX_VALUE
-
-
Constructor Summary
Constructors Constructor Description VariableName()
Initializes the name with a default value.VariableName(String s)
Initializes the object with the string to parse.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getTipText()
Returns a tool tip for the GUI editor (ignored if null is returned).protected void
initialize()
Initializes the internal object.boolean
isValid(String value)
Checks whether the string value is a valid presentation for this class.String
paddedValue()
Returns the variable name with start and end tag enclosed.-
Methods inherited from class adams.core.base.AbstractBaseString
convert, getValue, 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
the default value.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VariableName
public VariableName()
Initializes the name with a default value.
-
VariableName
public VariableName(String s)
Initializes the object with the string to parse.- Parameters:
s
- the string to parse
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the internal object.- Overrides:
initialize
in classAbstractBaseString
-
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:
- true if a valid variable name
- See Also:
Variables.isValidName(String)
-
paddedValue
public String paddedValue()
Returns the variable name with start and end tag enclosed.- Returns:
- the padded variable name if an actual value available, otherwise an empty string
-
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
-
-