This class uses linear probing and is thread safe due to copy on write semantics. As such it is not recomended for data that changes frequently.
This class does not actually implement the map interface to avoid implementing unnecessary operations.
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private int | |
| private volatile Object[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | |
| private boolean | |
| private void | |
| public SubstringMap. | |
| public SubstringMap. | |
| private SubstringMap. | |
| private static int | |
| public Iterable | |
| public synchronized void | |
| public synchronized V | |
| private int | |
| public Map |
| ALL_BUT_LAST_BIT | back to summary |
|---|---|
| private static final int ALL_BUT_LAST_BIT | |
| size | back to summary |
|---|---|
| private int size | |
| table | back to summary |
|---|---|
| private volatile Object[] table | |
| SubstringMap | back to summary |
|---|---|
| public SubstringMap() | |
| clear | back to summary |
|---|---|
| public synchronized void clear() | |
| doEquals | back to summary |
|---|---|
| private boolean doEquals(String s1, String s2, int length) | |
| doPut | back to summary |
|---|---|
| private void doPut(Object[] newTable, String key, Object value) | |
| get | back to summary |
|---|---|
| public SubstringMap. | |
| get | back to summary |
|---|---|
| public SubstringMap. | |
| get | back to summary |
|---|---|
| private SubstringMap. | |
| hash | back to summary |
|---|---|
| private static int hash(String value, int length) | |
| keys | back to summary |
|---|---|
| public Iterable | |
| put | back to summary |
|---|---|
| public synchronized void put(String key, V value) | |
| remove | back to summary |
|---|---|
| public synchronized V remove(String key) | |
| tablePos | back to summary |
|---|---|
| private int tablePos(Object[] table, int hash) | |
| toMap | back to summary |
|---|---|
| public Map | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public V |
| SubstringMatch | back to summary |
|---|---|
| public SubstringMatch(String key, V value) | |
| getKey | back to summary |
|---|---|
| public String getKey() | |
| getValue | back to summary |
|---|---|
| public V getValue() | |