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 void
addNodeToGroup(NodeID node, java.lang.String group)
Add a Node to a groupvoid
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
protected void
fireChangeEvent()
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 void
initShutdownTask()
boolean
isNodeInGroup(NodeID node, java.lang.String group)
Does a particular node belong to a specific group?protected void
load()
void
removeGroup(java.lang.String group)
Remove a group, including all the associations it containsvoid
removeNodeFromGroup(NodeID node, java.lang.String group)
Remove a node from a groupvoid
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
protected void
store()
-
-
-
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)
-
-