org.eclipse.jgit.lib.ObjectId
subclasses.
This map provides an efficient translation from any ObjectId instance to a cached subclass of ObjectId that has the same value.
If object instances are stored in only one map,
org. is a more efficient
implementation.
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private static final int | |
| private int | |
| pack-priv int | |
| pack-priv V[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public < type of values Q extends V> void | |
| public < type of values Q extends V> V | Returns: newValue if stored, or the prior value already stored and
that would have been returned had the caller used
get(newValue) first.the object to store. newValue)Store an object for future lookup. |
| public void | |
| public boolean | contains(AnyObjectId
the objectId to find toFind)Implements org. Returns true if the objectId is contained within the collection. |
| private final V[] | |
| public V | Returns: the instance mapped to toFind, or null if no mapping exists.the object identifier to find. toFind)Lookup an existing mapping. |
| private void | |
| private void | |
| private void | |
| public boolean | |
| public Iterator | |
| public int |
| grow | back to summary |
|---|---|
| private int grow | |
| INITIAL_TABLE_SIZE | back to summary |
|---|---|
| private static final int INITIAL_TABLE_SIZE | |
| mask | back to summary |
|---|---|
| private int mask | |
| size | back to summary |
|---|---|
| pack-priv int size | |
| table | back to summary |
|---|---|
| pack-priv V[] table | |
| ObjectIdSubclassMap | back to summary |
|---|---|
| public ObjectIdSubclassMap() Create an empty map. | |
| add | back to summary |
|---|---|
| public <Q extends V> void add(Q newValue) Store an object for future lookup.
An existing mapping for must not be in this map. Callers must
first call
| |
| addIfAbsent | back to summary |
|---|---|
| public <Q extends V> V addIfAbsent(Q newValue) Store an object for future lookup.
Stores V obj = ...; boolean wasNew = map.addIfAbsent(obj) == obj;
| |
| clear | back to summary |
|---|---|
| public void clear() Remove all entries from this map. | |
| contains | back to summary |
|---|---|
| public boolean contains(AnyObjectId toFind) Implements org. Doc from org. Returns true if the objectId is contained within the collection. Returns true if this map contains the specified object.
| |
| createArray | back to summary |
|---|---|
private final V[] createArray(int sz)
| |
| get | back to summary |
|---|---|
| public V get(AnyObjectId toFind) Lookup an existing mapping.
| |
| grow | back to summary |
|---|---|
| private void grow() | |
| initTable | back to summary |
|---|---|
| private void initTable(int sz) | |
| insert | back to summary |
|---|---|
| private void insert(V newValue) | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Whether
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Doc from java. Returns an iterator over elements of type | |
| size | back to summary |
|---|---|
| public int size() Get number of objects in map
| |