br.com.objectos.git
Class Entry

java.lang.Object
  extended by br.com.objectos.git.Entry
All Implemented Interfaces:
br.com.objectos.core.object.ToStringObject

public final class Entry
extends Object

A Git tree entry resulting from a read tree operation.

Since:
1

Method Summary
 void formatToString(StringBuilder sb, int depth)
           
 EntryMode getMode()
          Returns the file mode of this tree entry.
 String getName()
          Returns the name of this tree entry.
 ObjectId getObjectId()
          Returns an object representing the hash value that uniquely identifies the git object referenced by this tree entry.
 boolean hasName(String name)
          Returns true if this tree entry has the specified name, false otherwise.
 boolean isBlob()
          Returns true if this tree entry references a blob object.
 boolean isTree()
          Returns true if this tree entry references a tree object.
 String print()
          Returns a string representation of the form octal blob|tree hash name.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

formatToString

public final void formatToString(StringBuilder sb,
                                 int depth)

getMode

public final EntryMode getMode()
Returns the file mode of this tree entry.

Returns:
the file mode of this tree entry

getName

public final String getName()
Returns the name of this tree entry.

Returns:
the name of this tree entry

getObjectId

public final ObjectId getObjectId()
Returns an object representing the hash value that uniquely identifies the git object referenced by this tree entry.

Returns:
an object representing the hash value

isBlob

public final boolean isBlob()
Returns true if this tree entry references a blob object.

Returns:
true if this tree entry references a blob object

isTree

public final boolean isTree()
Returns true if this tree entry references a tree object.

Returns:
true if this tree entry references a tree object

print

public final String print()
Returns a string representation of the form octal blob|tree hash name.

Returns:
a string representation

hasName

public final boolean hasName(String name)
Returns true if this tree entry has the specified name, false otherwise.

Parameters:
name - the value to test this entry's name against
Returns:
true if this tree entry has the specified name, false otherwise
Since:
3

toString

public final String toString()
Overrides:
toString in class Object


Copyright © 2020–2022 Objectos Software LTDA. All rights reserved.