|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.net4j.util.ref.Interner<E>

| Nested Class Summary | |
|---|---|
protected static class |
Interner.Entry<E>
A weak reference holder that caches the hash code of the referent and is chained in the entries to handle collisions. |
| Constructor Summary | |
|---|---|
Interner()
|
|
Interner(int minimumCapacity)
|
|
| Method Summary | |
|---|---|
protected void |
addEntry(Interner.Entry<E> entry)
Adds a new entry, ensures the capacity is sufficient and increases the size. |
protected Interner.Entry<E> |
createEntry(E object,
int hashCode)
|
protected boolean |
equals(E object,
E otherObject)
Returns true if the two objects are to be considered equal. |
protected Interner.Entry<E> |
getEntry(int hashCode)
Gets the first entry in the table with exactly the given hash code. |
void |
grow(int minimumCapacity)
Ensures that the set has at least the specifies capacity. |
protected int |
hashCode(E object)
|
E |
intern(E object)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Interner()
public Interner(int minimumCapacity)
| Method Detail |
|---|
public void grow(int minimumCapacity)
public E intern(E object)
protected Interner.Entry<E> getEntry(int hashCode)
Interner.Entry.getNextEntry() to yield the next entry with exactly this same hash code.
protected int hashCode(E object)
protected boolean equals(E object,
E otherObject)
add,
contains, get, intern(Object), #remove(Object).
protected Interner.Entry<E> createEntry(E object,
int hashCode)
protected void addEntry(Interner.Entry<E> entry)
ensures the capacity is sufficient and increases the size.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||