Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.batik.css.engine
Class StringIntMap  view StringIntMap download StringIntMap.java

java.lang.Object
  extended byorg.apache.batik.css.engine.StringIntMap

public class StringIntMap
extends java.lang.Object

A simple hashtable, not synchronized, with fixed load factor. Keys are Strings and values are ints.

Version:
$Id: StringIntMap.java,v 1.3 2004/08/18 07:12:48 vhardy Exp $

Nested Class Summary
protected static class StringIntMap.Entry
          To manage collisions
 
Field Summary
protected  int count
          The number of entries
protected  StringIntMap.Entry[] table
          The underlying array
 
Constructor Summary
StringIntMap(int c)
          Creates a new table.
 
Method Summary
 int get(java.lang.String key)
          Gets the value corresponding to the given string.
 void put(java.lang.String key, int value)
          Sets a new value for the given variable
protected  void rehash()
          Rehash the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

table

protected StringIntMap.Entry[] table
The underlying array


count

protected int count
The number of entries

Constructor Detail

StringIntMap

public StringIntMap(int c)
Creates a new table.

Method Detail

get

public int get(java.lang.String key)
Gets the value corresponding to the given string.


put

public void put(java.lang.String key,
                int value)
Sets a new value for the given variable


rehash

protected void rehash()
Rehash the table