Package org.yamcs.xtce
Class BaseDataType
- java.lang.Object
-
- org.yamcs.xtce.NameDescription
-
- org.yamcs.xtce.BaseDataType
-
- All Implemented Interfaces:
Serializable,DataType
- Direct Known Subclasses:
BaseTimeDataType,BinaryDataType,BooleanDataType,EnumeratedDataType,NumericDataType,StringDataType
public abstract class BaseDataType extends NameDescription implements DataType
Base class for all simple XTCE types - tha is all types exceptAggregateDataTypeandArrayDataType- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBaseDataType.Builder<T extends BaseDataType.Builder<T>>
-
Field Summary
Fields Modifier and Type Field Description protected DataEncodingencoding-
Fields inherited from class org.yamcs.xtce.NameDescription
ancillaryData, name, PATH_SEPARATOR, qualifiedName, xtceAliasSet
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseDataType(BaseDataType t)creates a shallow copy of t
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description DataEncodinggetEncoding()List<UnitType>getUnitSet()abstract ObjectparseString(String stringValue)Used to parse string such as an initial valueObjectparseStringForRawValue(String stringValue)protected abstract voidsetInitialValue(Object initialValue)protected voidsetInitialValue(BaseDataType.Builder<?> builder)StringtoString(Object o)Converts a value to a string.-
Methods inherited from class org.yamcs.xtce.NameDescription
addAlias, addAliases, addAncillaryData, getAlias, getAliasSet, getAncillaryData, getLongDescription, getName, getName, getOpsName, getQualifiedName, getShortDescription, getSubsystemName, getSubsystemName, setAliasSet, setAncillaryData, setLongDescription, setName, setQualifiedName, setShortDescription
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.yamcs.xtce.DataType
getInitialValue, getLongDescription, getName, getShortDescription, getTypeAsString, getValueType
-
-
-
-
Field Detail
-
encoding
protected DataEncoding encoding
-
-
Constructor Detail
-
BaseDataType
protected BaseDataType(BaseDataType t)
creates a shallow copy of t- Parameters:
t-
-
-
Method Detail
-
getEncoding
public DataEncoding getEncoding()
-
setInitialValue
protected void setInitialValue(BaseDataType.Builder<?> builder)
-
setInitialValue
protected abstract void setInitialValue(Object initialValue)
-
parseString
public abstract Object parseString(String stringValue)
Used to parse string such as an initial value- Specified by:
parseStringin interfaceDataType- Parameters:
stringValue-- Returns:
-
toString
public String toString(Object o)
Description copied from interface:DataTypeConverts a value to a string. This should be the reverse ofDataType.parseString(String).
-
-