Class StringMap
- java.lang.Object
-
- org.apache.batik.css.engine.value.StringMap
-
public class StringMap extends java.lang.Object
A simple hashtable, not synchronized, with fixed load factor and with equality test made with '=='.- Version:
- $Id: StringMap.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
StringMap.Entry
To manage collisions
-
Field Summary
Fields Modifier and Type Field Description protected int
count
The number of entriesprotected static int
INITIAL_CAPACITY
The initial capacityprotected StringMap.Entry[]
table
The underlying array
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 variableprotected void
rehash()
Rehash the table
-
-
-
Field Detail
-
INITIAL_CAPACITY
protected static final int INITIAL_CAPACITY
The initial capacity- See Also:
- Constant Field Values
-
table
protected StringMap.Entry[] table
The underlying array
-
count
protected int count
The number of entries
-
-
Constructor Detail
-
StringMap
public StringMap()
Creates a new table.
-
StringMap
public StringMap(StringMap t)
Creates a copy of the given StringMap object.- Parameters:
t
- The table to copy.
-
-
Method Detail
-
get
public java.lang.Object get(java.lang.String key)
Gets the value corresponding to the given string.- Returns:
- the value or null
-
put
public java.lang.Object put(java.lang.String key, java.lang.Object value)
Sets a new value for the given variable- Returns:
- the old value or null
-
rehash
protected void rehash()
Rehash the table
-
-