public class StringMap
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
StringMap.Entry
To manage collisions
|
Modifier and Type | Field and Description |
---|---|
protected int |
count
The number of entries
|
protected static int |
INITIAL_CAPACITY
The initial capacity
|
protected StringMap.Entry[] |
table
The underlying array
|
Constructor and Description |
---|
StringMap()
Creates a new table.
|
StringMap(StringMap t)
Creates a copy of the given StringMap object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.String key)
Gets the value corresponding to the given string.
|
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
Sets a new value for the given variable
|
protected void |
rehash()
Rehash the table
|
protected static final int INITIAL_CAPACITY
protected StringMap.Entry[] table
protected int count
public StringMap()
public StringMap(StringMap t)
t
- The table to copy.public java.lang.Object get(java.lang.String key)
public java.lang.Object put(java.lang.String key, java.lang.Object value)
protected void rehash()
Copyright © 2022 Apache Software Foundation. All Rights Reserved.