Class Node<T>
java.lang.Object
solver.Node<T>
- Type Parameters:
T
- represents the moves that can be applied to the states
Represents the nodes of a search graph.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
expand()
Expands the node by generating all possible next states from the current state.getMove()
Returns the move that created the state from the state of the parent node.Returns the parent of the node.puzzle.State
<T> getState()
Returns the state represented by the node.int
hashCode()
toString()
-
Constructor Details
-
Node
Creates aNode
without a parent, i.e., a root node.- Parameters:
state
- the state represented by the node
-
Node
-
-
Method Details
-
getState
Returns the state represented by the node.- Returns:
- the state represented by the node
-
getParent
-
getMove
-
expand
-
equals
-
hashCode
-
toString
-