public final class StringCache
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
StringCache.ByteEntry |
protected static class |
StringCache.CharEntry |
| Constructor and Description |
|---|
StringCache() |
| Modifier and Type | Method and Description |
|---|---|
protected static int |
compare(ByteChunk name,
byte[] compareTo)
Compare given byte chunk with byte array.
|
protected static int |
compare(CharChunk name,
char[] compareTo)
Compare given char chunk with char array.
|
protected static java.lang.String |
find(ByteChunk name)
Find an entry given its name in the cache and return the associated String.
|
protected static java.lang.String |
find(CharChunk name)
Find an entry given its name in the cache and return the associated String.
|
protected static int |
findClosest(ByteChunk name,
StringCache.ByteEntry[] array,
int len)
Find an entry given its name in a sorted array of map elements.
|
protected static int |
findClosest(CharChunk name,
StringCache.CharEntry[] array,
int len)
Find an entry given its name in a sorted array of map elements.
|
static int |
getAccessCount() |
static boolean |
getByteEnabled() |
static int |
getCacheSize() |
static boolean |
getCharEnabled() |
static int |
getHitCount() |
static int |
getTrainThreshold() |
static void |
reset() |
static void |
setByteEnabled(boolean byteEnabled) |
static void |
setCacheSize(int cacheSize) |
static void |
setCharEnabled(boolean charEnabled) |
static void |
setTrainThreshold(int trainThreshold) |
static java.lang.String |
toString(ByteChunk bc) |
static java.lang.String |
toString(CharChunk cc) |
public static int getCacheSize()
public static void setCacheSize(int cacheSize)
cacheSize - The cacheSize to set.public static boolean getByteEnabled()
public static void setByteEnabled(boolean byteEnabled)
byteEnabled - The enabled to set.public static boolean getCharEnabled()
public static void setCharEnabled(boolean charEnabled)
charEnabled - The enabled to set.public static int getTrainThreshold()
public static void setTrainThreshold(int trainThreshold)
trainThreshold - The trainThreshold to set.public static int getAccessCount()
public static int getHitCount()
public static void reset()
public static java.lang.String toString(ByteChunk bc)
public static java.lang.String toString(CharChunk cc)
protected static int compare(ByteChunk name, byte[] compareTo)
protected static java.lang.String find(ByteChunk name)
protected static int findClosest(ByteChunk name, StringCache.ByteEntry[] array, int len)
protected static int compare(CharChunk name, char[] compareTo)
protected static java.lang.String find(CharChunk name)
protected static int findClosest(CharChunk name, StringCache.CharEntry[] array, int len)
Copyright © 2018 Oracle Corporation. All Rights Reserved.