| java.lang.Object com.nabhinc.util.md.StringCache
StringCache | public class StringCache (Code) | | This class implements a String cache for ByteChunk and CharChunk.
author: Remy Maucherat |
Inner Class :public static class ByteEntry | |
Inner Class :public static class CharEntry | |
accessCount | protected static int accessCount(Code) | | Access count.
|
bcCache | protected static ByteEntry[] bcCache(Code) | | Cache for byte chunk.
|
bcCount | protected static int bcCount(Code) | | toString count for byte chunk.
|
bcStats | protected static HashMap bcStats(Code) | | Statistics hash map for byte chunk.
|
byteEnabled | protected static boolean byteEnabled(Code) | | Enabled ?
|
cacheSize | protected static int cacheSize(Code) | | |
ccCache | protected static CharEntry[] ccCache(Code) | | Cache for char chunk.
|
ccCount | protected static int ccCount(Code) | | toString count for char chunk.
|
ccStats | protected static HashMap ccStats(Code) | | Statistics hash map for char chunk.
|
charEnabled | protected static boolean charEnabled(Code) | | |
hitCount | protected static int hitCount(Code) | | Hit count.
|
trainThreshold | protected static int trainThreshold(Code) | | |
compare | final protected static int compare(ByteChunk name, byte[] compareTo)(Code) | | Compare given byte chunk with byte array.
Return -1, 0 or +1 if inferior, equal, or superior to the String.
|
compare | final protected static int compare(CharChunk name, char[] compareTo)(Code) | | Compare given char chunk with char array.
Return -1, 0 or +1 if inferior, equal, or superior to the String.
|
find | final protected static String find(ByteChunk name)(Code) | | Find an entry given its name in the cache and return the associated String.
|
find | final protected static String find(CharChunk name)(Code) | | Find an entry given its name in the cache and return the associated String.
|
findClosest | final protected static int findClosest(ByteChunk name, ByteEntry[] array, int len)(Code) | | Find an entry given its name in a sorted array of map elements.
This will return the index for the closest inferior or equal item in the
given array.
|
findClosest | final protected static int findClosest(CharChunk name, CharEntry[] array, int len)(Code) | | Find an entry given its name in a sorted array of map elements.
This will return the index for the closest inferior or equal item in the
given array.
|
getAccessCount | public int getAccessCount()(Code) | | Returns the accessCount. |
getByteEnabled | public boolean getByteEnabled()(Code) | | Returns the enabled. |
getCacheSize | public int getCacheSize()(Code) | | Returns the cacheSize. |
getCharEnabled | public boolean getCharEnabled()(Code) | | Returns the enabled. |
getHitCount | public int getHitCount()(Code) | | Returns the hitCount. |
getTrainThreshold | public int getTrainThreshold()(Code) | | Returns the trainThreshold. |
reset | public void reset()(Code) | | |
setByteEnabled | public void setByteEnabled(boolean byteEnabled)(Code) | | Parameters: byteEnabled - The enabled to set. |
setCacheSize | public void setCacheSize(int cacheSize)(Code) | | Parameters: cacheSize - The cacheSize to set. |
setCharEnabled | public void setCharEnabled(boolean charEnabled)(Code) | | Parameters: charEnabled - The enabled to set. |
setTrainThreshold | public void setTrainThreshold(int trainThreshold)(Code) | | Parameters: trainThreshold - The trainThreshold to set. |
|
|