Package org.apache.iotdb.tsfile.utils
Class TsPrimitiveType
- java.lang.Object
-
- org.apache.iotdb.tsfile.utils.TsPrimitiveType
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TsPrimitiveType.TsBinary,TsPrimitiveType.TsBoolean,TsPrimitiveType.TsDouble,TsPrimitiveType.TsFloat,TsPrimitiveType.TsInt,TsPrimitiveType.TsLong,TsPrimitiveType.TsVector
public abstract class TsPrimitiveType extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTsPrimitiveType.TsBinarystatic classTsPrimitiveType.TsBooleanstatic classTsPrimitiveType.TsDoublestatic classTsPrimitiveType.TsFloatstatic classTsPrimitiveType.TsIntstatic classTsPrimitiveType.TsLongstatic classTsPrimitiveType.TsVector
-
Constructor Summary
Constructors Constructor Description TsPrimitiveType()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)BinarygetBinary()booleangetBoolean()static TsPrimitiveTypegetByType(TSDataType dataType)get tsPrimitiveType by resultDataType.static TsPrimitiveTypegetByType(TSDataType dataType, Object v)get tsPrimitiveType by resultDataType and initial value.abstract TSDataTypegetDataType()doublegetDouble()floatgetFloat()intgetInt()longgetLong()abstract intgetSize()get the size of one instance of current class.abstract StringgetStringValue()abstract ObjectgetValue()TsPrimitiveType[]getVector()inthashCode()abstract voidreset()voidsetBinary(Binary val)voidsetBoolean(boolean val)voidsetDouble(double val)voidsetFloat(float val)voidsetInt(int val)voidsetLong(long val)abstract voidsetObject(Object val)voidsetVector(TsPrimitiveType[] val)StringtoString()
-
-
-
Method Detail
-
getByType
public static TsPrimitiveType getByType(TSDataType dataType)
get tsPrimitiveType by resultDataType.- Parameters:
dataType- given TsDataType
-
getByType
public static TsPrimitiveType getByType(TSDataType dataType, Object v)
get tsPrimitiveType by resultDataType and initial value.- Parameters:
dataType- given TsDataTypev- initial value
-
getBoolean
public boolean getBoolean()
-
getInt
public int getInt()
-
getLong
public long getLong()
-
getFloat
public float getFloat()
-
getDouble
public double getDouble()
-
getBinary
public Binary getBinary()
-
getVector
public TsPrimitiveType[] getVector()
-
setBoolean
public void setBoolean(boolean val)
-
setInt
public void setInt(int val)
-
setLong
public void setLong(long val)
-
setFloat
public void setFloat(float val)
-
setDouble
public void setDouble(double val)
-
setBinary
public void setBinary(Binary val)
-
setVector
public void setVector(TsPrimitiveType[] val)
-
setObject
public abstract void setObject(Object val)
-
reset
public abstract void reset()
-
getSize
public abstract int getSize()
get the size of one instance of current class.- Returns:
- size of one instance of current class
-
getValue
public abstract Object getValue()
-
getStringValue
public abstract String getStringValue()
-
getDataType
public abstract TSDataType getDataType()
-
-