br.com.objectos.git
public final class MutableTree extends Object
| Constructor and Description |
|---|
MutableTree()
Creates an unnamed
MutableTree instance. |
MutableTree(String name)
Creates a
MutableTree instance having the specified name. |
| Modifier and Type | Method and Description |
|---|---|
void |
addEntry(Entry entry)
Adds the specified entry to this mutable tree.
|
void |
addEntry(MutableBlob blob)
Adds the specified blob to this mutable tree.
|
void |
addEntry(MutableTree tree)
Adds the specified tree to this mutable tree.
|
void |
clear()
Removes all of the entries from this tree.
|
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 name)
Returns
true if this tree entry has the specified name,
false otherwise. |
String |
toString() |
public MutableTree()
MutableTree instance.public MutableTree(String name)
MutableTree instance having the specified name.name - the name of this tree when serving as a tree entryIllegalArgumentException - if name is an empty stringpublic final void addEntry(Entry entry)
entry - the entry to be addedpublic final void addEntry(MutableBlob blob)
blob - the blob to be addedpublic final void addEntry(MutableTree tree)
tree - the tree to be addedpublic final void clear()
public final void formatToString(StringBuilder sb, int depth)
public final EntryMode getMode()
public final String getName()
public final boolean hasName(String name)
true if this tree entry has the specified name,
false otherwise.name - the value to test this entry's name againsttrue if this tree entry has the specified name,
false otherwiseCopyright © 2020–2022 Objectos Software LTDA. All rights reserved.