|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.xmlstore.nodes.NodeNavigator
public class NodeNavigator
Chooses the first node in an equivalence class as the canonical node.
Subclass to override policy. If bounds are null no node
will be considered outside.
| Field Summary | |
|---|---|
protected LocalLocator |
bound1
|
protected LocalLocator |
bound2
|
| Constructor Summary | |
|---|---|
NodeNavigator()
|
|
| Method Summary | |
|---|---|
int |
childCount(SystemNode node)
Returns the number of children of the specified node. |
SystemNode |
chooseCanonical(List<Compactor.Edge> eqCls)
Choose the canonical node from among equivalent nodes. |
SystemNode |
getChild(SystemNode node,
int index)
Returns the child of the specified node with the specified child index. |
int |
getHeight(SystemNode node)
Returns the height of the specified node. |
Object |
getVisitToken(SystemNode node)
Returns the visit token of the specified node. |
boolean |
isOutside(SystemNode node)
Returns true if the specified node is outside the bounds
for the discrimination. |
void |
setBounds(LocalLocator bound1,
LocalLocator bound2)
|
void |
setChild(SystemNode node,
int index,
SystemNode child)
Replaces an existing reference to a child node. |
void |
setHeight(SystemNode node,
int height)
Sets the height of the specified node. |
void |
setVisitToken(SystemNode node,
Object token)
Sets the visit token of the specified node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected LocalLocator bound1
protected LocalLocator bound2
| Constructor Detail |
|---|
public NodeNavigator()
| Method Detail |
|---|
public void setBounds(LocalLocator bound1,
LocalLocator bound2)
public boolean isOutside(SystemNode node)
Navigatortrue if the specified node is outside the bounds
for the discrimination. The node will not be visited.
isOutside in interface Navigator<SystemNode>public SystemNode chooseCanonical(List<Compactor.Edge> eqCls)
Navigator
chooseCanonical in interface Navigator<SystemNode>
public SystemNode getChild(SystemNode node,
int index)
Navigator
getChild in interface Navigator<SystemNode>
public void setChild(SystemNode node,
int index,
SystemNode child)
Navigator
setChild in interface Navigator<SystemNode>public int childCount(SystemNode node)
Navigator
childCount in interface Navigator<SystemNode>public Object getVisitToken(SystemNode node)
Navigator
getVisitToken in interface Navigator<SystemNode>
public void setVisitToken(SystemNode node,
Object token)
Navigator
setVisitToken in interface Navigator<SystemNode>public int getHeight(SystemNode node)
Navigator
getHeight in interface Navigator<SystemNode>
public void setHeight(SystemNode node,
int height)
Navigator
setHeight in interface Navigator<SystemNode>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||