Class AWTGlyphGeometryCache
java.lang.Object
org.apache.batik.gvt.font.AWTGlyphGeometryCache
This class represents a doubly indexed hash table, which holds
soft references to the contained glyph geometry informations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classTo manage collisionsstatic classThe object that holds glyph geometry. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe number of entriesprotected static final intThe initial capacityprotected ReferenceQueueThe reference queue.protected AWTGlyphGeometryCache.Entry[]The underlying array -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new AWTGlyphGeometryCache.AWTGlyphGeometryCache(int c) Creates a new AWTGlyphGeometryCache. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the table.get(char c) Gets the value of a variableprotected inthashCode(char c) Computes a hash code corresponding to the given objects.put(char c, AWTGlyphGeometryCache.Value value) Sets a new value for the given variableprotected voidrehash()Rehash the tableprotected voidRemoves the cleared entries.intsize()Returns the size of this table.
-
Field Details
-
INITIAL_CAPACITY
protected static final int INITIAL_CAPACITYThe initial capacity- See Also:
-
table
The underlying array -
count
protected int countThe number of entries -
referenceQueue
The reference queue.
-
-
Constructor Details
-
AWTGlyphGeometryCache
public AWTGlyphGeometryCache()Creates a new AWTGlyphGeometryCache. -
AWTGlyphGeometryCache
public AWTGlyphGeometryCache(int c) Creates a new AWTGlyphGeometryCache.- Parameters:
c- The inital capacity.
-
-
Method Details
-
size
public int size()Returns the size of this table. -
get
Gets the value of a variable- Returns:
- the value or null
-
put
Sets a new value for the given variable- Returns:
- the old value or null
-
clear
public void clear()Clears the table. -
rehash
protected void rehash()Rehash the table -
hashCode
protected int hashCode(char c) Computes a hash code corresponding to the given objects. -
removeClearedEntries
protected void removeClearedEntries()Removes the cleared entries.
-