|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.memory.IStateBinaryTree.Node
public static class IStateBinaryTree.Node
Inner class representing a node in the binary tree a node is an interval
Field Summary | |
---|---|
IStateBinaryTree.Node |
father
the father of this node in the tree |
int |
inf
the lower bound of the node |
int |
infStamp
the timestamp of the lwer bound |
IStateBinaryTree.Node |
leftNode
the left son of this node in the tree |
protected StoredBinaryTreeTrail |
myTrail
|
IStateBinaryTree.Node |
rightNode
the right son of this node in the tree |
int |
sup
the upper bound of the node |
int |
supStamp
the timestamp of the upper bound |
IStateBinaryTree |
tree
the binary tree the node belongs to |
Constructor Summary | |
---|---|
IStateBinaryTree.Node(IStateBinaryTree tree,
int inf,
int sup)
Construct a new node (interval) |
Method Summary | |
---|---|
void |
_setInf(int newInf,
int infStamp)
set a new lower bound to the node, without saving it used for trailing purpose |
void |
_setSup(int newSup,
int supStamp)
set a new upper bound to the node, without saving it used for trailing purpose |
boolean |
contains(int value)
Check wether a value is in the interval represented by thiis node |
int |
getInf()
Gets the lower bound of the node |
int |
getSize()
gets the size of the interval represented by this node |
int |
getSup()
Gets the upper bound of the node |
void |
setInf(int newInf)
set a new lower bound to the node, and saving it if needed |
void |
setSup(int newSup)
set a new upper bound to the node, and saving it if needed used for trailing purpose |
String |
toString()
return a String representing the node as an interval |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int inf
public int sup
public int infStamp
public int supStamp
public IStateBinaryTree tree
public IStateBinaryTree.Node father
public IStateBinaryTree.Node leftNode
public IStateBinaryTree.Node rightNode
protected final StoredBinaryTreeTrail myTrail
Constructor Detail |
---|
public IStateBinaryTree.Node(IStateBinaryTree tree, int inf, int sup)
tree
- the tree the node belongs toinf
- the lower bound of this intervalsup
- the upper bound of this intervalMethod Detail |
---|
public boolean contains(int value)
value
- integer value to be check
public int getSize()
public void _setInf(int newInf, int infStamp)
newInf
- the new value of the lower boundinfStamp
- the new timestamp of the lower boundpublic void setInf(int newInf)
newInf
- the new value of the lower boundpublic void _setSup(int newSup, int supStamp)
newSup
- the new value of the upper boundsupStamp
- the new timestamp of the upper boundpublic void setSup(int newSup)
newSup
- the new value of the upper boundpublic int getInf()
public int getSup()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |