public class StringMap extends 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 |
---|---|
Object |
get(String key)
Gets the value corresponding to the given string.
|
Object |
put(String key,
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.Copyright © 2000–2023 Apache Software Foundation. All rights reserved.