Class BasicSerializer<T>
java.lang.Object
org.djutils.serialization.serializers.BasicSerializer<T>
- Type Parameters:
 T- class
- All Implemented Interfaces:
 Serializer<T>
- Direct Known Subclasses:
 ArrayOrMatrixSerializer,ArrayOrMatrixWithUnitSerializer,BasicPrimitiveArrayOrMatrixSerializer,ObjectSerializer
public abstract class BasicSerializer<T> extends Object implements Serializer<T>
Basics of the serializer
 
 Copyright (c) 2019-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. 
 BSD-style license. See OpenTrafficSim License.
 
- Version:
 - $Revision$, $LastChangedDate$, by $Author$, 
 - Author:
 - Alexander Verbraeck, Peter Knoppers, Wouter Schakel
 
- 
Constructor Summary
Constructors Constructor Description BasicSerializer(byte type, String dataClassName)Construct the BasicSerializer. - 
Method Summary
Modifier and Type Method Description StringdataClassName()Return a description of the type of data that this serializer handles.bytefieldType()Return the byte representation of the field type.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.djutils.serialization.serializers.Serializer
deSerialize, getNumberOfDimensions, serialize, serializeWithPrefix, size, sizeWithPrefix 
- 
Constructor Details
- 
BasicSerializer
Construct the BasicSerializer.- Parameters:
 type- byte; the field type (returned by thefieldTypemethod)dataClassName- String; returned by the dataClassName method
 
 - 
 - 
Method Details
- 
fieldType
public final byte fieldType()Return the byte representation of the field type.- Specified by:
 fieldTypein interfaceSerializer<T>- Returns:
 - byte
 
 - 
dataClassName
Return a description of the type of data that this serializer handles. The result of this method should not be subject to localization because it is used in the SerialDataDecoder to identify the type of a serializer.- Specified by:
 dataClassNamein interfaceSerializer<T>- Returns:
 - String; description of the type of data that this serializer handles
 
 - 
toString
 
 -