Package adams.core.base
Class BaseCommandLine
- java.lang.Object
-
- adams.core.base.BaseObject
-
- adams.core.base.AbstractBaseString
-
- adams.core.base.BaseCommandLine
-
- All Implemented Interfaces:
CloneHandler<BaseObject>
,Serializable
,Comparable
public class BaseCommandLine extends AbstractBaseString
Wrapper for a commandline object to be editable in the GOE. Basically the same as BaseString, but used for class names and their associated options.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.core.base.BaseObject
m_Internal, m_Properties, SUFFIX_DISPLAY, SUFFIX_VALUE
-
-
Constructor Summary
Constructors Constructor Description BaseCommandLine()
Initializes the string with length 0.BaseCommandLine(Class cls)
Initializes the object with the class to use.BaseCommandLine(Object obj)
Initializes the object with the commandline object to use.BaseCommandLine(String s)
Initializes the object with the string to parse.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
classnamePart()
Returns the classname part of the command-line.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.Object
objectValue()
Returns the commandline as object.String
optionsPart()
Returns the options part of the command-line.-
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
-
-
-
-
Constructor Detail
-
BaseCommandLine
public BaseCommandLine()
Initializes the string with length 0.
-
BaseCommandLine
public BaseCommandLine(String s)
Initializes the object with the string to parse.- Parameters:
s
- the string to parse
-
BaseCommandLine
public BaseCommandLine(Class cls)
Initializes the object with the class to use.- Parameters:
cls
- the class to use
-
BaseCommandLine
public BaseCommandLine(Object obj)
Initializes the object with the commandline object to use.- Parameters:
obj
- the object to use
-
-
Method Detail
-
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 non-null
-
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
-
classnamePart
public String classnamePart()
Returns the classname part of the command-line.- Returns:
- the classname
-
optionsPart
public String optionsPart()
Returns the options part of the command-line.- Returns:
- the options
-
objectValue
public Object objectValue()
Returns the commandline as object.- Returns:
- the instantiated object, null if invalid (or empty)
-
-