Package adams.core.base
Class BaseLong
- java.lang.Object
-
- adams.core.base.BaseObject
-
- adams.core.base.BaseLong
-
- All Implemented Interfaces:
CloneHandler<BaseObject>,Serializable,Comparable
public class BaseLong extends BaseObject
Wrapper for a Long object to be editable in the GOE.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULTthe default value.-
Fields inherited from class adams.core.base.BaseObject
m_Internal, m_Properties, SUFFIX_DISPLAY, SUFFIX_VALUE
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetTipText()Returns a tool tip for the GUI editor (ignored if null is returned).StringgetValue()Returns the current string value.protected voidinitialize()Initializes the internal object.booleanisValid(String value)Checks whether the string value is a valid presentation for this class.longlongValue()Returns the long value.voidsetValue(String value)Sets the string value.static BaseLong[]toBaseLong(long[] values)Turns the primitive array into a BaseLong one.static BaseLong[]toBaseLong(Long[] values)Turns the primitive array into a BaseLong one.static Long[]toNumber(BaseLong[] values)Turns the BaseLong array into a number array.static long[]toPrimitive(BaseLong[] values)Turns the BaseLong array into a primitive array.-
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
-
BaseLong
public BaseLong()
Initializes the string with length 0.
-
BaseLong
public BaseLong(String s)
Initializes the object with the string to parse.- Parameters:
s- the string to parse
-
BaseLong
public BaseLong(Long value)
Initializes the object with the given value.- Parameters:
value- the value to use
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the internal object.- Overrides:
initializein classBaseObject
-
isValid
public boolean isValid(String value)
Checks whether the string value is a valid presentation for this class.- Specified by:
isValidin classBaseObject- Parameters:
value- the string value to check- Returns:
- true if parseable long
-
setValue
public void setValue(String value)
Sets the string value.- Specified by:
setValuein classBaseObject- Parameters:
value- the string value
-
getValue
public String getValue()
Returns the current string value.- Specified by:
getValuein classBaseObject- Returns:
- the string value
-
longValue
public long longValue()
Returns the long value.- Returns:
- the long value
-
getTipText
public String getTipText()
Returns a tool tip for the GUI editor (ignored if null is returned).- Specified by:
getTipTextin classBaseObject- Returns:
- the tool tip
-
toPrimitive
public static long[] toPrimitive(BaseLong[] values)
Turns the BaseLong array into a primitive array.- Parameters:
values- the array to convert- Returns:
- the primitive array
-
toBaseLong
public static BaseLong[] toBaseLong(long[] values)
Turns the primitive array into a BaseLong one.- Parameters:
values- the array to convert- Returns:
- the BaseObject array
-
toNumber
public static Long[] toNumber(BaseLong[] values)
Turns the BaseLong array into a number array.- Parameters:
values- the array to convert- Returns:
- the number array
-
-