Package adams.core
Class VariableNameValuePair
- java.lang.Object
-
- adams.core.base.BaseObject
-
- adams.core.base.AbstractBaseString
-
- adams.core.VariableNameValuePair
-
- All Implemented Interfaces:
CloneHandler<BaseObject>,Serializable,Comparable
public class VariableNameValuePair extends AbstractBaseString
Wrapper for a name/value pair of a variable.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringSEPARATORthe separator.-
Fields inherited from class adams.core.base.BaseObject
m_Internal, m_Properties, SUFFIX_DISPLAY, SUFFIX_VALUE
-
-
Constructor Summary
Constructors Constructor Description VariableNameValuePair()Initializes the string with length 0.VariableNameValuePair(String s)Initializes the object with the string to parse.VariableNameValuePair(String key, String value)Initializes the object with the key/value pair.
-
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.StringpairValue()Returns the backquoted String pair.VariableNamevarName()Returns the variable name.StringvarValue()Returns the variable value.-
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
-
SEPARATOR
public static final String SEPARATOR
the separator.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VariableNameValuePair
public VariableNameValuePair()
Initializes the string with length 0.
-
VariableNameValuePair
public VariableNameValuePair(String key, String value)
Initializes the object with the key/value pair.- Parameters:
key- the key to usevalue- the value to use
-
VariableNameValuePair
public VariableNameValuePair(String s)
Initializes the object with the string to parse.- Parameters:
s- the string to parse
-
-
Method Detail
-
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 non-null
-
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
-
pairValue
public String pairValue()
Returns the backquoted String pair.- Returns:
- the backquoted pair
-
varName
public VariableName varName()
Returns the variable name.- Returns:
- the key
-
varValue
public String varValue()
Returns the variable value.- Returns:
- the value
-
-