| java.lang.Object org.apache.batik.css.engine.StringIntMap
StringIntMap | public class StringIntMap (Code) | | A simple hashtable, not synchronized, with fixed load factor.
Keys are Strings and values are ints.
author: Stephane Hillion version: $Id$ |
Inner Class :protected static class Entry | |
Field Summary | |
protected int | count | protected Entry[] | table |
Constructor Summary | |
public | StringIntMap(int c) Creates a new table. |
Method Summary | |
public int | get(String key) Gets the value corresponding to the given string. | public void | put(String key, int value) | protected void | rehash() |
count | protected int count(Code) | | The number of entries
|
table | protected Entry[] table(Code) | | The underlying array
|
StringIntMap | public StringIntMap(int c)(Code) | | Creates a new table.
Parameters: c - The capacity of the table. |
get | public int get(String key)(Code) | | Gets the value corresponding to the given string.
the value or -1. |
put | public void put(String key, int value)(Code) | | Sets a new value for the given variable
|
rehash | protected void rehash()(Code) | | Rehash the table
|
|
|