java.lang.Object
org.jpo.datamodel.NodeNavigator
org.jpo.datamodel.RandomNavigator
- All Implemented Interfaces:
NodeNavigatorInterface
This class returns a NodeNavigator which shuffles the supplied nodes
-
Constructor Summary
ConstructorDescriptionRandomNavigator
(List<SortableDefaultMutableTreeNode> nodes, String title) Constructor for a RandomNavigator. -
Method Summary
Methods inherited from class org.jpo.datamodel.NodeNavigator
addNodeNavigatorListener, notifyNodeNavigatorListeners, removeNodeNavigatorListener
-
Constructor Details
-
RandomNavigator
Constructor for a RandomNavigator.- Parameters:
nodes
- A List of nodes to randomly navigatetitle
- The title of the nodes
-
-
Method Details
-
getTitle
returns a title for this NodeNavigator- Returns:
- the Title for the NodeNavigator
-
getNumberOfNodes
public int getNumberOfNodes()Returns the number of nodes in the shuffled list- Returns:
- The number of nodes in the list
-
getNode
Returns the node for the specific index- Parameters:
index
- The index of the node to retrieve- Returns:
- the node for the index number
-