Package jmri.jmrix.openlcb
Class OlcbNodeGroupStore
- java.lang.Object
-
- jmri.jmrix.openlcb.OlcbNodeGroupStore
-
- All Implemented Interfaces:
InstanceManagerAutoDefault
public class OlcbNodeGroupStore extends java.lang.Object implements InstanceManagerAutoDefault
Maintain information about which group(s) contain a node.
-
-
Constructor Summary
Constructors Constructor Description OlcbNodeGroupStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNodeToGroup(NodeID node, java.lang.String group)Add a Node to a groupvoidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)protected voidfireChangeEvent()java.util.List<java.lang.String>getGroupNames()Get alphanumerically-sorted List of existing group namesjava.util.Set<NodeID>getGroupNodes(java.lang.String group)Get a Set of nodes in a groupjava.util.List<java.lang.String>getNodesGroups(NodeID node)Get an ordered set of groups a node belongs to.protected voidinitShutdownTask()booleanisNodeInGroup(NodeID node, java.lang.String group)Does a particular node belong to a specific group?protected voidload()voidremoveGroup(java.lang.String group)Remove a group, including all the associations it containsvoidremoveNodeFromGroup(NodeID node, java.lang.String group)Remove a node from a groupvoidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)protected voidstore()
-
-
-
Constructor Detail
-
OlcbNodeGroupStore
public OlcbNodeGroupStore()
-
-
Method Detail
-
load
protected void load()
-
store
protected void store() throws java.io.IOException
- Throws:
java.io.IOException
-
initShutdownTask
protected void initShutdownTask()
-
addNodeToGroup
public void addNodeToGroup(NodeID node, java.lang.String group)
Add a Node to a group
-
removeNodeFromGroup
public void removeNodeFromGroup(NodeID node, java.lang.String group)
Remove a node from a group
-
removeGroup
public void removeGroup(java.lang.String group)
Remove a group, including all the associations it contains
-
getGroupNames
public java.util.List<java.lang.String> getGroupNames()
Get alphanumerically-sorted List of existing group names
-
getGroupNodes
public java.util.Set<NodeID> getGroupNodes(java.lang.String group)
Get a Set of nodes in a group
-
getNodesGroups
public java.util.List<java.lang.String> getNodesGroups(NodeID node)
Get an ordered set of groups a node belongs to.
-
isNodeInGroup
public boolean isNodeInGroup(NodeID node, java.lang.String group)
Does a particular node belong to a specific group?
-
fireChangeEvent
protected void fireChangeEvent()
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
-
-