Package org.apache.batik.css.engine
Class StringIntMap
java.lang.Object
org.apache.batik.css.engine.StringIntMap
A simple hashtable, not synchronized, with fixed load factor.
Keys are Strings and values are ints.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
The number of entriesprotected StringIntMap.Entry[]
The underlying array -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
table
The underlying array -
count
protected int countThe number of entries
-
-
Constructor Details
-
StringIntMap
public StringIntMap(int c) Creates a new table.- Parameters:
c
- The capacity of the table.
-
-
Method Details
-
get
Gets the value corresponding to the given string.- Returns:
- the value or -1.
-
put
Sets a new value for the given variable -
rehash
protected void rehash()Rehash the table
-