|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.starlink.table.DescribedValue
Contains a value (an Object) as well as a
ValueInfo
object which provides metadata about that value
(name, class, shape, units and so on).
Constructor Summary | |
DescribedValue(ValueInfo vinfo)
Constructs a new DescribedValue object to hold values described by a given ValueInfo object. |
|
DescribedValue(ValueInfo vinfo,
Object value)
Constructs a new DescribedValue object to hold values described by a given ValueInfo object and with a given initial value. |
Method Summary | |
ValueInfo |
getInfo()
Returns the ValueInfo object which describes the value held by this object. |
Object |
getValue()
Returns the actual value content of this object. |
String |
getValueAsString(int maxLength)
Returns a string representation of the value of this object, no longer than a given maximum length. |
void |
setValue(Object value)
Sets the actual value content of this object. |
void |
setValueFromString(String sval)
Sets the value of this object from a string representation. |
String |
toString()
Returns a string representation of this object no longer than a default maximum length. |
String |
toString(int maxLength)
Returns a string representation of this object, no longer than a given maximum length. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DescribedValue(ValueInfo vinfo)
vinfo
- the metadata handler for this valuepublic DescribedValue(ValueInfo vinfo, Object value)
vinfo
- the metadata describing this object's valuevalue
- the value of this object
IllegalArgumentException
- if value.getClass()
is not compatible with vinfo.getContentClass()Method Detail |
public ValueInfo getInfo()
public void setValue(Object value)
value
- the value
IllegalArgumentException
- if value.getClass() is not
compatible with getValueInfo().getContentClass()public Object getValue()
public String getValueAsString(int maxLength)
maxLength
- the maximum number of characters in the returned
stringpublic void setValueFromString(String sval)
public String toString(int maxLength)
maxLength
- the maximum number of characters in the returned
string
public String toString()
toString
in class Object
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |