@Entity
public class BNode
extends java.lang.Object
implements java.io.Serializable
Modifier | Constructor and Description |
---|---|
protected |
BNode()
Use a
BGraph object to instantiate a node. |
Modifier and Type | Method and Description |
---|---|
BNode |
addEdge(long hash,
byte move)
Adds a new edge to this node.
|
BNode[] |
childs()
Returns an array containing all the childs of this node.
|
float |
getBPriority()
Returns the book player priority for this node
|
BNode |
getChild(int edge)
Returns the child node linked to an specified edge.
|
byte |
getFlag()
Returns this node flag value
|
long |
getHash()
Returns the unique identifier of this node
|
byte |
getMove(int edge)
Returns the move for an specified edge.
|
float |
getOPriority()
Returns the opponent priority for this node
|
int |
getScore()
Returns the score for this node
|
int |
numEdges()
Returns the number of childs of the node.
|
void |
setBPriority(float priority)
Sets the book player priority value of this node.
|
void |
setFlag(byte flag)
Sets this node flag
|
protected void |
setGraph(BGraph graph)
Sets the graph object to which this node pertains.
|
protected void |
setHash(long hash)
Sets the unique identifier for this node.
|
void |
setOPriority(float priority)
Sets the opponent priority value of this node.
|
void |
setScore(int score)
Sets the score value of this node
|
protected void setGraph(BGraph graph)
graph
- a graph objectprotected void setHash(long hash)
hash
- unique identifierpublic void setScore(int score)
score
- score valuepublic void setBPriority(float priority)
priority
- priority valuepublic void setOPriority(float priority)
priority
- priority valuepublic void setFlag(byte flag)
flag
- flag for this nodepublic long getHash()
public int getScore()
public float getBPriority()
public float getOPriority()
public byte getFlag()
public byte getMove(int edge)
edge
- edge identifierpublic int numEdges()
public BNode getChild(int edge) throws com.sleepycat.je.DatabaseException
edge
- edge identifiercom.sleepycat.je.DatabaseException
- if a database failure occurspublic BNode addEdge(long hash, byte move) throws com.sleepycat.je.DatabaseException
hash
- child node identifier for the edgemove
- move that leads to the edgecom.sleepycat.je.DatabaseException
- if a database failure occurspublic BNode[] childs() throws com.sleepycat.je.DatabaseException
null
if node childs
were added to this nodecom.sleepycat.je.DatabaseException
- if a database failure occurs