|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.utility.characters.CharIndex
public abstract class CharIndex
Provides methods to get information about printable characters. Any printable character is assotiated with an index to be used in an array of the size [total number of printable chars].
| Nested Class Summary | |
|---|---|
static class |
CharIndex.MemoryStrategy
For expressing values within the MemoryStrategy: p is the number of printable characters a is the number of all possible characters |
| Constructor Summary | |
|---|---|
protected |
CharIndex()
|
| Method Summary | |
|---|---|
static CharIndex |
createBinSearchOptimizedCharIndex()
Creates a search-optimized CharIndex. |
static CharIndex |
createBinSearchOptimizedCharIndex(java.nio.charset.Charset charset)
Creates a search-optimized CharIndex. |
static CharIndex |
createBinSearchOptimizedCharIndex(java.lang.String charset)
Creates a search-optimized CharIndex. |
static CharIndex |
createBitSetOptimizedCharIndex()
Creates a BitSet-optimized CharIndex. |
static CharIndex |
createBitSetOptimizedCharIndex(java.nio.charset.Charset charset)
Creates a BitSet-optimized CharIndex. |
static CharIndex |
createBitSetOptimizedCharIndex(java.lang.String charset)
Creates a BitSet-optimized CharIndex. |
static CharIndex |
createGCOptimizedCharIndex()
Creates a GC-optimized CharIndex. |
static CharIndex |
createGCOptimizedCharIndex(java.nio.charset.Charset charset)
Creates a GC-optimized CharIndex. |
static CharIndex |
createGCOptimizedCharIndex(java.lang.String charset)
Creates a GC-optimized CharIndex. |
static CharIndex |
createHashOptimizedCharIndex()
Creates a hash-optimized CharIndex. |
static CharIndex |
createHashOptimizedCharIndex(java.nio.charset.Charset charset)
Creates a hash-optimized CharIndex. |
static CharIndex |
createHashOptimizedCharIndex(java.lang.String charset)
Creates a hash-optimized CharIndex. |
static CharIndex |
createSpaceOptimizedCharIndex()
Creates a space-optimized CharIndex. |
static CharIndex |
createSpaceOptimizedCharIndex(java.nio.charset.Charset charset)
Creates a space-optimized CharIndex. |
static CharIndex |
createSpaceOptimizedCharIndex(java.lang.String charset)
Creates a space-optimized CharIndex. |
abstract java.nio.charset.Charset |
getCharset()
|
abstract int |
getIndex(char ch)
If you want to allocate a smaller array [size: getNumberOfPrintableChars()], You can use the int returned by this method as the index in this array. |
abstract CharIndex.MemoryStrategy |
getMemoryStrategy()
|
abstract int |
getNumberOfPrintableChars()
|
abstract int |
getTotalNumberOfCharacters()
|
static boolean |
isPrintable(char ch)
Simply determines, if the given char is printable without any optimizations. |
static boolean |
isPrintable(char ch,
java.nio.charset.Charset charset)
Simply determines, if the given char is printable without any optimizations. |
protected static boolean |
isPrintable(char ch,
java.nio.charset.CharsetEncoder encoder,
java.nio.CharBuffer charBuffer,
java.nio.ByteBuffer byteBuffer)
|
static boolean |
isPrintable(char ch,
java.lang.String charset)
Simply determines, if the given char is printable without any optimizations. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected CharIndex()
| Method Detail |
|---|
protected static boolean isPrintable(char ch,
java.nio.charset.CharsetEncoder encoder,
java.nio.CharBuffer charBuffer,
java.nio.ByteBuffer byteBuffer)
public static boolean isPrintable(char ch,
java.nio.charset.Charset charset)
ch - the questionary charcharset - the Charset to use
public static boolean isPrintable(char ch,
java.lang.String charset)
ch - the questionary charcharset - the Charset to use
public static boolean isPrintable(char ch)
ch - the questionary char
public abstract CharIndex.MemoryStrategy getMemoryStrategy()
public abstract java.nio.charset.Charset getCharset()
public abstract int getTotalNumberOfCharacters()
public abstract int getNumberOfPrintableChars()
public abstract int getIndex(char ch)
ch - the questionary char
getNumberOfPrintableChars()public static CharIndex createSpaceOptimizedCharIndex(java.nio.charset.Charset charset)
CharIndex.MemoryStrategy.SPACE_OPTIMIZEDpublic static CharIndex createSpaceOptimizedCharIndex(java.lang.String charset)
CharIndex.MemoryStrategy.SPACE_OPTIMIZEDpublic static CharIndex createSpaceOptimizedCharIndex()
CharIndex.MemoryStrategy.SPACE_OPTIMIZEDpublic static CharIndex createBitSetOptimizedCharIndex(java.nio.charset.Charset charset)
CharIndex.MemoryStrategy.BITSET_OPTIMIZEDpublic static CharIndex createBitSetOptimizedCharIndex(java.lang.String charset)
CharIndex.MemoryStrategy.BITSET_OPTIMIZEDpublic static CharIndex createBitSetOptimizedCharIndex()
CharIndex.MemoryStrategy.BITSET_OPTIMIZEDpublic static CharIndex createGCOptimizedCharIndex(java.nio.charset.Charset charset)
CharIndex.MemoryStrategy.GC_OPTIMIZEDpublic static CharIndex createGCOptimizedCharIndex(java.lang.String charset)
CharIndex.MemoryStrategy.GC_OPTIMIZEDpublic static CharIndex createGCOptimizedCharIndex()
CharIndex.MemoryStrategy.GC_OPTIMIZEDpublic static CharIndex createHashOptimizedCharIndex(java.nio.charset.Charset charset)
CharIndex.MemoryStrategy.HASH_OPTIMIZEDpublic static CharIndex createHashOptimizedCharIndex(java.lang.String charset)
CharIndex.MemoryStrategy.HASH_OPTIMIZEDpublic static CharIndex createHashOptimizedCharIndex()
CharIndex.MemoryStrategy.HASH_OPTIMIZEDpublic static CharIndex createBinSearchOptimizedCharIndex(java.nio.charset.Charset charset)
CharIndex.MemoryStrategy.BINSEARCH_OPTIMIZEDpublic static CharIndex createBinSearchOptimizedCharIndex(java.lang.String charset)
CharIndex.MemoryStrategy.BINSEARCH_OPTIMIZEDpublic static CharIndex createBinSearchOptimizedCharIndex()
CharIndex.MemoryStrategy.BINSEARCH_OPTIMIZED
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||