Package org.apache.geode.pdx
Enum Class FieldType
- All Implemented Interfaces:
Serializable,Comparable<FieldType>,Constable
Every field of a pdx must have one of these types. The type of that field can never change. If
you do want to be able to change a field's class then its field type needs to be
OBJECT.
Some field types are always serialized with a certain number of bytes; these are called
"fixed-width". Others are serialized with a variable number of bytes; these are called
"variable-width".- Since:
- GemFire 6.6.2
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic FieldTypeGiven a Class return the corresponding FieldType.intgetWidth()booleantoString()static FieldTypeReturns the enum constant of this class with the specified name.static FieldType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BOOLEAN
-
BYTE
-
CHAR
-
SHORT
-
INT
-
LONG
-
FLOAT
-
DOUBLE
-
DATE
-
STRING
-
OBJECT
-
BOOLEAN_ARRAY
-
CHAR_ARRAY
-
BYTE_ARRAY
-
SHORT_ARRAY
-
INT_ARRAY
-
LONG_ARRAY
-
FLOAT_ARRAY
-
DOUBLE_ARRAY
-
STRING_ARRAY
-
OBJECT_ARRAY
-
ARRAY_OF_BYTE_ARRAYS
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isFixedWidth
public boolean isFixedWidth()- Returns:
- true if the type is "fixed-width"; false if it is "variable-width".
-
getWidth
public int getWidth()- Returns:
- the number of bytes used to serialize fixed-width fields; -1 is returned for variable-width fields.
-
toString
-
getDefaultBytes
- Returns:
- a ByteBuffer that contains the serialized encoding of this type's default value.
-
get
Given a Class return the corresponding FieldType. -
getDefaultValue
-