org.xith3d.utility.characters
Enum CharIndex.MemoryStrategy

java.lang.Object
  extended by java.lang.Enum<CharIndex.MemoryStrategy>
      extended by org.xith3d.utility.characters.CharIndex.MemoryStrategy
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CharIndex.MemoryStrategy>
Enclosing class:
CharIndex

public static enum CharIndex.MemoryStrategy
extends java.lang.Enum<CharIndex.MemoryStrategy>

For expressing values within the MemoryStrategy:


Enum Constant Summary
BINSEARCH_OPTIMIZED
          This strategy uses GC-optimized binary searching to retrieve and store the information.
BITSET_OPTIMIZED
          This strategy uses BitSets to determine the information.
GC_OPTIMIZED
          This is a GC optimized detection way.
HASH_OPTIMIZED
          This strategy uses GC-optimized hashing to retrieve and store the information.
SPACE_OPTIMIZED
          This strategy does no pre-collections of printable chars.
 
Method Summary
static CharIndex.MemoryStrategy valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CharIndex.MemoryStrategy[] 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

SPACE_OPTIMIZED

public static final CharIndex.MemoryStrategy SPACE_OPTIMIZED
This strategy does no pre-collections of printable chars.
getIndex() is executed in O(a).
getNumberOfPrintableChars() is executed in O(a) the first time and then in O(1).
Memory consumption is O(1).


BITSET_OPTIMIZED

public static final CharIndex.MemoryStrategy BITSET_OPTIMIZED
This strategy uses BitSets to determine the information.
getIndex() is executed in O(1) if the character is not found or (cheap) O(a) if the character is found.
getNumberOfPrintableChars() is executed in O(1).
Memory consumption is O(a/8).


GC_OPTIMIZED

public static final CharIndex.MemoryStrategy GC_OPTIMIZED
This is a GC optimized detection way.
getIndex() is executed in O(1).
getNumberOfPrintableChars() is executed in O(1).
Memory consumption is O(a*6).


HASH_OPTIMIZED

public static final CharIndex.MemoryStrategy HASH_OPTIMIZED
This strategy uses GC-optimized hashing to retrieve and store the information.
getIndex() is executed in O(1).
getNumberOfPrintableChars() is executed in O(1).
Memory consumption is O(p*25).


BINSEARCH_OPTIMIZED

public static final CharIndex.MemoryStrategy BINSEARCH_OPTIMIZED
This strategy uses GC-optimized binary searching to retrieve and store the information.
getIndex() is executed in O(log p).
getNumberOfPrintableChars() is executed in O(1).
Memory consumption is O(p*2).

Method Detail

values

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

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

valueOf

public static CharIndex.MemoryStrategy valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null