getEntryObjectId() 공개 메소드

Gets the ObjectId of the current entry.
public getEntryObjectId ( ) : ObjectId
리턴 ObjectId
예제 #1
0
파일: TreeWalk.cs 프로젝트: kkl713/GitSharp
        /**
         * Obtain the ObjectId for the current entry.
         * <para />
         * Every tree supplies an object id, even if the tree does not contain the
         * current entry. In the latter case {@link ObjectId#zeroId()} is supplied.
         * <para />
         * Applications should try to use {@link #idEqual(int, int)} when possible
         * as it avoids conversion overheads.
         *
         * @param out
         *            buffer to copy the object id into.
         * @param nth
         *            tree to obtain the object identifier from.
         * @see #idEqual(int, int)
         */
        public void getObjectId(MutableObjectId @out, int nth)
        {
            AbstractTreeIterator t = _trees[nth];

            if (t.Matches == _currentHead)
            {
                t.getEntryObjectId(@out);
            }
            else
            {
                @out.Clear();
            }
        }
예제 #2
0
파일: TreeWalk.cs 프로젝트: kkl713/GitSharp
        /**
         * Obtain the ObjectId for the current entry.
         * <para />
         * Using this method to compare ObjectId values between trees of this walker
         * is very inefficient. Applications should try to use
         * {@link #idEqual(int, int)} or {@link #getObjectId(MutableObjectId, int)}
         * whenever possible.
         * <para />
         * Every tree supplies an object id, even if the tree does not contain the
         * current entry. In the latter case {@link ObjectId#zeroId()} is returned.
         *
         * @param nth
         *            tree to obtain the object identifier from.
         * @return object identifier for the current tree entry.
         * @see #getObjectId(MutableObjectId, int)
         * @see #idEqual(int, int)
         */
        public ObjectId getObjectId(int nth)
        {
            AbstractTreeIterator t = _trees[nth];

            return(t.Matches == _currentHead?t.getEntryObjectId() : ObjectId.ZeroId);
        }