br.com.objectos.git
Class MutableTree

java.lang.Object
  extended by br.com.objectos.git.MutableTree
All Implemented Interfaces:
br.com.objectos.core.object.ToStringObject, Comparable<br.com.objectos.git.AbstractEntry>

public final class MutableTree
extends Object

A mutable Git tree object.

Since:
2

Method Summary
 void addEntry(Entry entry)
          Adds the specified entry to this writable tree.
 void addEntry(MutableBlob blob)
          Adds the specified blog to this writable tree.
 void addEntry(MutableTree tree)
          Adds the specified tree to this writable tree.
 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.
 boolean hasName(String expectedName)
          Verifies if this tree has the specified name.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

addEntry

public final void addEntry(Entry entry)
Adds the specified entry to this writable tree.

Parameters:
entry - the entry to be added

addEntry

public final void addEntry(MutableBlob blob)
Adds the specified blog to this writable tree.

Parameters:
blob - the blob to be added

addEntry

public final void addEntry(MutableTree tree)
Adds the specified tree to this writable tree.

Parameters:
tree - the tree to be added

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

hasName

public final boolean hasName(String expectedName)
Verifies if this tree has the specified name.

Parameters:
expectedName - the name to check for
Returns:
true if this tree has the specified name

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.