public class POSetNode
extends Object
Modifier and Type | Field and Description |
---|---|
(package private) ArrayList<POSetNode> |
childNodes |
(package private) ArrayList<POSetNode> |
parentNodes |
private Object |
posetKey |
Constructor and Description |
---|
POSetNode(Object obj) |
Modifier and Type | Method and Description |
---|---|
boolean |
addChild(POSetNode node)
Add a child node to this one, unless it's already a child to this node
|
boolean |
addParent(POSetNode node)
Add a parent node to this one, unless it's already a parent to this node.
|
ArrayList<POSetNode> |
getChildNodes() |
Object |
getKey() |
ArrayList<POSetNode> |
getParentNodes() |
boolean |
hasChild() |
boolean |
hasDirectChild(POSetNode node)
Looks to see if the argument node is a direct child to the caller's node
|
boolean |
hasDirectParent(POSetNode node)
Looks to see if the argument node is a direct parent to the target node
|
boolean |
hasIndirectChild(POSetNode node)
Looks to see if the argument node is a child (recursively) to the caller's node.
|
boolean |
hasIndirectParent(POSetNode node)
Looks to see if the argument node is a parent (recursively) to the target node.
|
boolean |
hasParent() |
boolean |
removeChild(POSetNode node)
Removes a child node from this one, as long as it's already there.
|
boolean |
removeParent(POSetNode node)
Removes a parent node from this one, unless it's not a parent to this node.
|
void |
setPosetKey(Object value) |
private Object posetKey
ArrayList<POSetNode> parentNodes
ArrayList<POSetNode> childNodes
public boolean hasParent()
public boolean hasChild()
public boolean addParent(POSetNode node)
node
- The parent node to addpublic boolean removeParent(POSetNode node)
node
- The parent node to addpublic boolean addChild(POSetNode node)
node
- The child node to addpublic boolean removeChild(POSetNode node)
node
- The child node to addpublic ArrayList<POSetNode> getParentNodes()
public ArrayList<POSetNode> getChildNodes()
public Object getKey()
public void setPosetKey(Object value)
public boolean hasDirectParent(POSetNode node)
node
- a potential parent node being consideredpublic boolean hasIndirectParent(POSetNode node)
node
- a potential parent node being consideredpublic boolean hasDirectChild(POSetNode node)
node
- a potential child node being consideredpublic boolean hasIndirectChild(POSetNode node)
node
- a potential child node being considered