| Access | Constructor and Description |
|---|---|
| public | |
| pack-priv | |
| public | EmptyTreeIterator(final AbstractTreeIterator
parent tree iterator. p, final byte[] path array to be used by the child iterator. This path must
contain the path from the top of the walk to the first child
and must end with a '/'. childPath, final int position within childPathOffset)childPath where the child can
insert its data. The value at
childPath[childPathOffset-1] must be '/'.Create an iterator for a subtree of an existing iterator. |
| Modifier and Type | Method and Description |
|---|---|
| public void | back(int
number of entries to move the iterator by. Must be a positive,
non-zero integer. delta)Implements abstract org. Move to prior entry, populating this iterator with the entry data. |
| public AbstractTreeIterator | createSubtreeIterator(ObjectReader
reader to load the tree data from. reader)Implements abstract org. Create a new iterator for the current entry's subtree. |
| public boolean | eof()
Implements abstract org. Is this tree iterator at its EOF point (no more entries)? |
| public boolean | first()
Implements abstract org. Is this tree iterator positioned on its first entry? |
| public ObjectId | getEntryObjectId()
Overrides org. Get the object id of the current entry. |
| public boolean | hasId()
Implements abstract org. Whether the entry has a valid ObjectId. |
| public byte[] | idBuffer()
Implements abstract org. Get the byte array buffer object IDs must be copied out of. |
| public int | idOffset()
Implements abstract org. Get the position within |
| protected boolean | needsStopWalk()
Overrides org. Whether the iterator implements |
| public void | next(int
number of entries to move the iterator by. Must be a positive,
non-zero integer. delta)Implements abstract org. Move to next entry, populating this iterator with the entry data. |
| public void | reset()
Overrides org. Position this iterator on the first entry. |
| public void | stopWalk()
Overrides org. Indicates to the iterator that no more entries will be read. |
| EmptyTreeIterator | back to summary |
|---|---|
| public EmptyTreeIterator() Create a new iterator with no parent. | |
| EmptyTreeIterator | back to summary |
|---|---|
| pack-priv EmptyTreeIterator(AbstractTreeIterator p) | |
| EmptyTreeIterator | back to summary |
|---|---|
| public EmptyTreeIterator(final AbstractTreeIterator p, final byte[] childPath, final int childPathOffset) Create an iterator for a subtree of an existing iterator. The caller is responsible for setting up the path of the child iterator.
| |
| back | back to summary |
|---|---|
| public void back(int delta) throws CorruptObjectException Implements abstract org. Doc from org. Move to prior entry, populating this iterator with the entry data. The delta indicates how many moves backward should occur.The most common delta is 1 to move to the prior entry. Implementations must populate the following members:
idBuffer() and idOffset()
when demanded.
| |
| createSubtreeIterator | back to summary |
|---|---|
| public AbstractTreeIterator createSubtreeIterator(ObjectReader reader) throws IncorrectObjectTypeException, IOException Implements abstract org. Doc from org. Create a new iterator for the current entry's subtree.
The parent reference of the iterator must be
| |
| eof | back to summary |
|---|---|
| public boolean eof() Implements abstract org. Doc from org. Is this tree iterator at its EOF point (no more entries)? An iterator is at EOF if there is no current entry.
| |
| first | back to summary |
|---|---|
| public boolean first() Implements abstract org. Doc from org. Is this tree iterator positioned on its first entry?
An iterator is positioned on the first entry if
An empty iterator (one with no entries) will be
| |
| getEntryObjectId | back to summary |
|---|---|
| public ObjectId getEntryObjectId() Overrides org. Doc from org. Get the object id of the current entry. | |
| hasId | back to summary |
|---|---|
| public boolean hasId() Implements abstract org. Doc from org. Whether the entry has a valid ObjectId.
| |
| idBuffer | back to summary |
|---|---|
| public byte[] idBuffer() Implements abstract org. Doc from org. Get the byte array buffer object IDs must be copied out of. The id buffer contains the bytes necessary to construct an ObjectId for the current entry of this iterator. The buffer can be the same buffer for all entries, or it can be a unique buffer per-entry. Implementations are encouraged to expose their private buffer whenever possible to reduce garbage generation and copying costs.
| |
| idOffset | back to summary |
|---|---|
| public int idOffset() Implements abstract org. Doc from org. Get the position within
| |
| needsStopWalk | back to summary |
|---|---|
| protected boolean needsStopWalk() Overrides org. Doc from org. Whether the iterator implements
| |
| next | back to summary |
|---|---|
| public void next(int delta) throws CorruptObjectException Implements abstract org. Doc from org. Move to next entry, populating this iterator with the entry data. The delta indicates how many moves forward should occur. The most common delta is 1 to move to the next entry. Implementations must populate the following members:
idBuffer() and idOffset()
when demanded.
| |
| reset | back to summary |
|---|---|
| public void reset() Overrides org. Doc from org. Position this iterator on the first entry.
The default implementation of this method uses
| |
| stopWalk | back to summary |
|---|---|
| public void stopWalk() Overrides org. Doc from org. Indicates to the iterator that no more entries will be read.
This is only invoked by TreeWalk when the iteration is aborted early due
to a
| |