|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jgit.dircache.DirCacheTree
public class DirCacheTree
Single tree record from the 'TREE' DirCache
extension.
A valid cache tree record contains the object id of a tree object and the
total number of DirCacheEntry
instances (counted recursively) from
the DirCache contained within the tree. This information facilitates faster
traversal of the index and quicker generation of tree objects prior to
creating a new commit.
An invalid cache tree record indicates a known subtree whose file entries have changed in ways that cause the tree to no longer have a known object id. Invalid cache tree records must be revalidated prior to use.
Method Summary | |
---|---|
DirCacheTree |
getChild(int i)
Get the i-th child cache tree. |
int |
getChildCount()
Get the number of cached subtrees contained within this tree. |
int |
getEntrySpan()
Get the number of entries this tree spans within the DirCache. |
String |
getNameString()
Get the tree's name within its parent. |
String |
getPathString()
Get the tree's path within the repository. |
boolean |
isValid()
Determine if this cache is currently valid. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public boolean isValid()
A valid cache tree knows how many DirCacheEntry
instances from
the parent DirCache
reside within this tree (recursively
enumerated). It also knows the object id of the tree, as the tree should
be readily available from the repository's object database.
public int getEntrySpan()
If this tree is not valid (see isValid()
) this method's return
value is always strictly negative (less than 0) but is otherwise an
undefined result.
public int getChildCount()
public DirCacheTree getChild(int i)
i
- index of the child to obtain.
public String getNameString()
This method is not very efficient and is primarily meant for debugging and final output generation. Applications should try to avoid calling it, and if invoked do so only once per interesting entry, where the name is absolutely required for correct function.
public String getPathString()
This method is not very efficient and is primarily meant for debugging and final output generation. Applications should try to avoid calling it, and if invoked do so only once per interesting entry, where the name is absolutely required for correct function.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |