com.bigdata.sparse
Enum ValueType

java.lang.Object
  extended by java.lang.Enum<ValueType>
      extended by com.bigdata.sparse.ValueType
All Implemented Interfaces:
Serializable, Comparable<ValueType>

public enum ValueType
extends Enum<ValueType>

A type safe enumeration of value types. This class also supports encoding and decoding of instances of the enumerated value types and is used for encoding and decoding of column values.


Enum Constant Summary
AutoIncInteger
          A 32-bit auto-incremental counter.
AutoIncLong
          A 64-bit auto-incremental counter.
ByteArray
          An uninterpreted byte array.
Date
          A date is serialized as a long integer.
Double
          A double precision floating point value.
Float
          A single precision floating point value.
Integer
          A 32-bit integer.
Long
          A 64-bit integer.
Serializable
          A Java object that will be serialized using its Serializable or Externalizable interface.
Unicode
          A Unicode string.
 
Method Summary
static Object decode(byte[] v)
           
static byte[] encode(Object v)
          Encode an object that is an instance of a supported class.
static DataOutputBuffer getBuffer()
          Return a ThreadLocal buffer that is used to serialize values.
 int intValue()
          An integer that identifies the type safe enumeration value.
static ValueType valueOf(int code)
           
static ValueType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ValueType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Integer

public static final ValueType Integer
A 32-bit integer.


Long

public static final ValueType Long
A 64-bit integer.


Float

public static final ValueType Float
A single precision floating point value.


Double

public static final ValueType Double
A double precision floating point value.


Unicode

public static final ValueType Unicode
A Unicode string.


Date

public static final ValueType Date
A date is serialized as a long integer.


ByteArray

public static final ValueType ByteArray
An uninterpreted byte array.


AutoIncInteger

public static final ValueType AutoIncInteger
A 32-bit auto-incremental counter.

See Also:
AutoIncIntegerCounter

AutoIncLong

public static final ValueType AutoIncLong
A 64-bit auto-incremental counter.

See Also:
AutoIncLongCounter

Serializable

public static final ValueType Serializable
A Java object that will be serialized using its Serializable or Externalizable interface.

Method Detail

values

public static ValueType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ValueType c : ValueType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ValueType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null

intValue

public int intValue()
An integer that identifies the type safe enumeration value.

Returns:

valueOf

public static ValueType valueOf(int code)

getBuffer

public static DataOutputBuffer getBuffer()
Return a ThreadLocal buffer that is used to serialize values.


encode

public static byte[] encode(Object v)
Encode an object that is an instance of a supported class.

Parameters:
v - The value.
Returns:
The serialized byte[] encoding that value -or- null iff the value is null.
Throws:
UnsupportedOperationException - if the value is not an instance of a supported class.

decode

public static Object decode(byte[] v)
Parameters:
v -
Returns:


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.