public class FormattedValue
extends java.lang.Object
implements java.io.Externalizable
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
fmt
The value's associated format string.
|
private BaseDataType |
value
The data value.
|
| Constructor and Description |
|---|
FormattedValue()
Default constructor, only used for
Externalizable. |
FormattedValue(BaseDataType value,
java.lang.String fmt)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getFormat()
Get the format string.
|
BaseDataType |
getValue()
Get the data value.
|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
java.lang.String |
toString() |
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
private BaseDataType value
private java.lang.String fmt
public FormattedValue()
Externalizable.public FormattedValue(BaseDataType value, java.lang.String fmt)
value - The data value for this instance.fmt - An optional format string to use with this value.public BaseDataType getValue()
public java.lang.String getFormat()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablein - Input source from which fields will be restored.java.io.IOException - In case of I/O errors.java.lang.ClassNotFoundException - If payload can't be instantiated.public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - The output destination to which fields will be saved.java.io.IOException - In case of I/O errors.