public static class DfsRefDatabase.RefCache
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) RefList<Ref> |
ids |
(package private) RefList<Ref> |
sym |
| Constructor and Description |
|---|
RefCache(RefList<Ref> ids,
DfsRefDatabase.RefCache old) |
RefCache(RefList<Ref> ids,
RefList<Ref> sym)
Initialize a new reference cache.
|
| Modifier and Type | Method and Description |
|---|---|
Ref |
get(java.lang.String name)
Find a reference by name.
|
DfsRefDatabase.RefCache |
put(Ref ref)
Obtain a modified copy of the cache with a ref stored.
|
DfsRefDatabase.RefCache |
remove(java.lang.String refName)
Obtain a modified copy of the cache with the ref removed.
|
int |
size() |
public RefCache(RefList<Ref> ids, RefList<Ref> sym)
The two reference lists supplied must be sorted in correct order (string compare order) by name.
ids - references that carry an ObjectId, and all of sym.sym - references that are symbolic references to others.RefCache(RefList<Ref> ids, DfsRefDatabase.RefCache old)
public int size()
public Ref get(java.lang.String name)
name - full name of the reference.public DfsRefDatabase.RefCache put(Ref ref)
This cache instance is not modified by this method.
ref - reference to add or replace.public DfsRefDatabase.RefCache remove(java.lang.String refName)
This cache instance is not modified by this method.
refName - reference to remove, if it exists.