public class NamedCharTable extends GeneralHashTable<java.lang.String,java.lang.String>
HashMap<String,String>
, except that
the value strings are allocated lazily when the key is first requested.
(Not sure if this is worth a separate class, but the code is
simple, it should make startup faster, and save having to
intern over 2200 value strings.)DEFAULT_INITIAL_SIZE, mask, num_bindings, table
Constructor and Description |
---|
NamedCharTable() |
Modifier and Type | Method and Description |
---|---|
boolean |
appendTo(java.lang.String key,
java.lang.Appendable out) |
protected HashNode<java.lang.String,java.lang.String> |
makeEntry(java.lang.String key,
int hash,
java.lang.String value)
Allocate a new node in the hash table.
|
void |
put(java.lang.String name,
int char1) |
void |
put(java.lang.String name,
int char1,
int char2) |
allocEntries, getEntryHashCode, getEntryNext, getNode, setEntryNext
clear, entrySet, get, get, getOrDefault, hash, hashToIndex, matches, matches, put, put, rehash, remove, size
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, values
protected HashNode<java.lang.String,java.lang.String> makeEntry(java.lang.String key, int hash, java.lang.String value)
GeneralHashTable
makeEntry
in class GeneralHashTable<java.lang.String,java.lang.String>
public boolean appendTo(java.lang.String key, java.lang.Appendable out)
public void put(java.lang.String name, int char1)
public void put(java.lang.String name, int char1, int char2)