| Modifier and Type | Class | Description |
|---|---|---|
protected static class |
InnerNodeImpl.Factory |
| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.List<Node> |
children |
|
protected java.util.Map<java.lang.String,Node> |
childrenMap |
|
protected int |
numOfLeaves |
level, location, name, parent, PATH_SEPARATOR, PATH_SEPARATOR_STR, ROOT| Modifier | Constructor | Description |
|---|---|---|
protected |
InnerNodeImpl(java.lang.String path) |
Construct an InnerNode from a path-like string.
|
protected |
InnerNodeImpl(java.lang.String name,
java.lang.String location,
InnerNode parent,
int level) |
Construct an InnerNode
from its name, its network location, its parent, and its level.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
add(Node n) |
Add node n to the subtree of this node
|
boolean |
equals(java.lang.Object to) |
|
java.util.List<Node> |
getChildren() |
|
Node |
getLeaf(int leafIndex,
Node excludedNode) |
get leafIndex leaf of this subtree
if it is not in the excludedNode
|
Node |
getLoc(java.lang.String loc) |
Given a node's string representation, return a reference to the node
|
java.lang.String |
getNextAncestorName(Node n) |
|
int |
getNumOfChildren() |
|
int |
getNumOfLeaves() |
|
int |
hashCode() |
|
boolean |
isAncestor(Node n) |
Judge if this node is an ancestor of node n.
|
boolean |
isParent(Node n) |
Judge if this node is the parent of node n.
|
boolean |
isRack() |
Judge if this node represents a rack.
|
boolean |
remove(Node n) |
Remove node n from the subtree of this node
|
getLevel, getName, getNetworkLocation, getParent, getPath, getPathComponents, locationToDepth, normalize, setLevel, setNetworkLocation, setParent, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetLevel, getName, getNetworkLocation, getParent, setLevel, setNetworkLocation, setParentprotected final java.util.List<Node> children
protected final java.util.Map<java.lang.String,Node> childrenMap
protected int numOfLeaves
protected InnerNodeImpl(java.lang.String path)
path - input path.protected InnerNodeImpl(java.lang.String name,
java.lang.String location,
InnerNode parent,
int level)
name - input name.location - input location.parent - input parent.level - input level.public java.util.List<Node> getChildren()
getChildren in interface InnerNodepublic int getNumOfChildren()
getNumOfChildren in interface InnerNodepublic boolean isRack()
public boolean isAncestor(Node n)
n - a nodepublic boolean isParent(Node n)
n - a nodepublic java.lang.String getNextAncestorName(Node n)
public boolean add(Node n)
InnerNodepublic boolean remove(Node n)
InnerNodepublic Node getLoc(java.lang.String loc)
InnerNodegetLoc in interface InnerNodeloc - string location of the form /rack/nodeInnerNodeImplpublic Node getLeaf(int leafIndex, Node excludedNode)
InnerNodepublic int getNumOfLeaves()
getNumOfLeaves in interface InnerNodeCopyright © 2008–2025 Apache Software Foundation. All rights reserved.