public abstract class BasePrimitive<T> extends BaseIdentifiableElement implements IPrimitiveDatatype<T>, Externalizable
| Constructor and Description |
|---|
BasePrimitive() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
encode(T theValue)
Subclasses must override to convert a "coerced" value into an encoded one.
|
boolean |
equals(Object theObj) |
T |
getValue() |
String |
getValueAsString() |
int |
hashCode() |
boolean |
isEmpty() |
protected abstract T |
parse(String theValue)
Subclasses must override to convert an encoded representation of this datatype into a "coerced" one
|
void |
readExternal(ObjectInput theIn) |
BasePrimitive<T> |
setValue(T theValue) |
void |
setValueAsString(String theValue) |
String |
toString() |
protected void |
updateStringValue() |
void |
writeExternal(ObjectOutput theOut) |
getElementSpecificId, getId, setElementSpecificId, setId, setIdaddUndeclaredExtension, addUndeclaredExtension, addUndeclaredExtension, getAllUndeclaredExtensions, getFormatCommentsPost, getFormatCommentsPre, getUndeclaredExtensions, getUndeclaredExtensionsByUrl, getUndeclaredModifierExtensions, hasFormatComment, isBaseEmptyclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetFormatCommentsPost, getFormatCommentsPre, hasFormatCommentpublic BasePrimitive()
protected abstract String encode(T theValue)
theValue - Will not be nullpublic T getValue()
getValue in interface IPrimitiveDatatype<T>getValue in interface IPrimitiveType<T>public String getValueAsString() throws DataFormatException
getValueAsString in interface IPrimitiveDatatype<T>getValueAsString in interface IPrimitiveType<T>DataFormatExceptionprotected abstract T parse(String theValue)
theValue - Will not be nullpublic void readExternal(ObjectInput theIn) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic BasePrimitive<T> setValue(T theValue) throws DataFormatException
setValue in interface IPrimitiveDatatype<T>setValue in interface IPrimitiveType<T>DataFormatExceptionpublic void setValueAsString(String theValue) throws DataFormatException
setValueAsString in interface IPrimitiveDatatype<T>setValueAsString in interface IPrimitiveType<T>DataFormatExceptionprotected void updateStringValue()
public void writeExternal(ObjectOutput theOut) throws IOException
writeExternal in interface ExternalizableIOExceptionCopyright © 2014–2017 University Health Network. All rights reserved.