com.bigdata.sparse
Enum KeyType

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

public enum KeyType
extends Enum<KeyType>

A type safe enumeration of key types and the byte values that are used to encode that key type within the encoded Schema name.

See Also:
Schema.getSchemaBytes()

Enum Constant Summary
ASCII
          Variable length ASCII string.
Date
           
Double
           
Float
           
Integer
           
Long
           
Unicode
          Variable length Unicode string.
 
Method Summary
 byte getByteCode()
          The byte that indicates this KeyType.
 int getEncodedLength()
          The #of bytes in which values of that KeyType are encoded -or- zero (0) iff values are encoded in a variable number of bytes with a nul terminator for the byte sequence.
static KeyType getKeyType(byte b)
          Return the KeyType given its byte code.
 boolean isFixedLength()
          True iff the key type is encoded in a fixed #of bytes.
static KeyType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static KeyType[] 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 KeyType Integer

Long

public static final KeyType Long

Float

public static final KeyType Float

Double

public static final KeyType Double

Unicode

public static final KeyType Unicode
Variable length Unicode string.


ASCII

public static final KeyType ASCII
Variable length ASCII string.


Date

public static final KeyType Date
Method Detail

values

public static KeyType[] 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 (KeyType c : KeyType.values())
    System.out.println(c);

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

valueOf

public static KeyType 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

isFixedLength

public boolean isFixedLength()
True iff the key type is encoded in a fixed #of bytes.


getEncodedLength

public int getEncodedLength()
The #of bytes in which values of that KeyType are encoded -or- zero (0) iff values are encoded in a variable number of bytes with a nul terminator for the byte sequence.


getByteCode

public byte getByteCode()
The byte that indicates this KeyType.

Returns:

getKeyType

public static KeyType getKeyType(byte b)
Return the KeyType given its byte code.

Parameters:
b - The byte code.
Returns:
The KeyType.


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