|
GemFire 7.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<FieldType>
com.gemstone.gemfire.pdx.FieldType
public enum FieldType
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".
| Method Summary | |
|---|---|
static FieldType |
get(Class<?> c)
Given a Class return the corresponding FieldType. |
ByteBuffer |
getDefaultBytes()
Returns a ByteBuffer that contains the serialized encoding of this type's default value. |
Object |
getDefaultValue()
|
int |
getWidth()
Returns the number of bytes used to serialize fixed-width fields; -1 is returned for variable-width fields. |
boolean |
isFixedWidth()
Returns true if the type is "fixed-width"; false if it is "variable-width". |
String |
toString()
|
static FieldType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static FieldType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final FieldType BOOLEAN
public static final FieldType BYTE
public static final FieldType CHAR
public static final FieldType SHORT
public static final FieldType INT
public static final FieldType LONG
public static final FieldType FLOAT
public static final FieldType DOUBLE
public static final FieldType DATE
public static final FieldType STRING
public static final FieldType OBJECT
public static final FieldType BOOLEAN_ARRAY
public static final FieldType CHAR_ARRAY
public static final FieldType BYTE_ARRAY
public static final FieldType SHORT_ARRAY
public static final FieldType INT_ARRAY
public static final FieldType LONG_ARRAY
public static final FieldType FLOAT_ARRAY
public static final FieldType DOUBLE_ARRAY
public static final FieldType STRING_ARRAY
public static final FieldType OBJECT_ARRAY
public static final FieldType ARRAY_OF_BYTE_ARRAYS
| Method Detail |
|---|
public static FieldType[] values()
for (FieldType c : FieldType.values()) System.out.println(c);
public static FieldType valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic boolean isFixedWidth()
public int getWidth()
public String toString()
toString in class Enum<FieldType>public ByteBuffer getDefaultBytes()
public static FieldType get(Class<?> c)
public Object getDefaultValue()
|
GemFire 7.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||