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, Comparable<br.com.objectos.git.AbstractEntry>

public final class Entry
extends Object

Represents a Git tree entry.

Since:
1

Method Summary
 int compareTo(br.com.objectos.git.AbstractEntry o)
           
 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 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

compareTo

public final int compareTo(br.com.objectos.git.AbstractEntry o)
Specified by:
compareTo in interface Comparable<br.com.objectos.git.AbstractEntry>

toString

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


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