|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.jgit.lib.ObjectIdSubclassMap<V>
V - type of subclass of ObjectId that will be stored in the map.public class ObjectIdSubclassMap<V extends ObjectId>
Fast, efficient map specifically for ObjectId subclasses.
This map provides an efficient translation from any ObjectId instance to a cached subclass of ObjectId that has the same value.
Raw value equality is tested when comparing two ObjectIds (or subclasses),
not reference equality and not .equals(Object) equality. This
allows subclasses to override equals to supply their own
extended semantics.
| Constructor Summary | |
|---|---|
ObjectIdSubclassMap()
Create an empty map. |
|
| Method Summary | ||
|---|---|---|
|
add(Q newValue)
Store an object for future lookup. |
|
void |
clear()
Remove all entries from this map. |
|
V |
get(AnyObjectId toFind)
Lookup an existing mapping. |
|
java.util.Iterator<V> |
iterator()
|
|
int |
size()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectIdSubclassMap()
| Method Detail |
|---|
public void clear()
public V get(AnyObjectId toFind)
toFind - the object identifier to find.
public <Q extends V> void add(Q newValue)
An existing mapping for must not be in this map. Callers must
first call get(AnyObjectId) to verify there is no current
mapping prior to adding a new mapping.
Q - type of instance to store.newValue - the object to store.public int size()
public java.util.Iterator<V> iterator()
iterator in interface java.lang.Iterable<V extends ObjectId>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||