Package org.epics.pvdata.factory
Class BaseScalar
- java.lang.Object
-
- org.epics.pvdata.factory.BaseField
-
- org.epics.pvdata.factory.BaseScalar
-
- All Implemented Interfaces:
Field,Scalar,Serializable
- Direct Known Subclasses:
BaseBoundedString
public class BaseScalar extends BaseField implements Scalar
Base class for implementing a Scalar. It is also a complete implementation.- Author:
- mrk
-
-
Field Summary
Fields Modifier and Type Field Description static String[]idLUTID for each scalarTypestatic byte[]typeCodeLUTType code for each scalarType.
-
Constructor Summary
Constructors Constructor Description BaseScalar(ScalarType scalarType)Constructor for BaseScalar.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeserialize(ByteBuffer buffer, DeserializableControl control)Deserialize buffer.booleanequals(Object obj)StringgetID()Get the identification string.ScalarTypegetScalarType()Get the ScalarType.inthashCode()voidserialize(ByteBuffer buffer, SerializableControl control)Serialize field into given buffer.voidtoString(StringBuilder buf, int indentLevel)Convert to a string
-
-
-
Field Detail
-
idLUT
public static final String[] idLUT
ID for each scalarType
-
typeCodeLUT
public static final byte[] typeCodeLUT
Type code for each scalarType.
-
-
Constructor Detail
-
BaseScalar
public BaseScalar(ScalarType scalarType)
Constructor for BaseScalar.- Parameters:
scalarType- The scalar Type.
-
-
Method Detail
-
getScalarType
public ScalarType getScalarType()
Description copied from interface:ScalarGet the ScalarType.- Specified by:
getScalarTypein interfaceScalar- Returns:
- the ScalarType (non-
null)
-
toString
public void toString(StringBuilder buf, int indentLevel)
Description copied from interface:FieldConvert to a string
-
serialize
public void serialize(ByteBuffer buffer, SerializableControl control)
Description copied from interface:SerializableSerialize field into given buffer.- Specified by:
serializein interfaceSerializable- Parameters:
buffer- the serialization buffercontrol- the flush interface
-
deserialize
public void deserialize(ByteBuffer buffer, DeserializableControl control)
Description copied from interface:SerializableDeserialize buffer.- Specified by:
deserializein interfaceSerializable- Parameters:
buffer- the serialization buffercontrol- the deserialization control
-
-