Package jmri.jmrix.openlcb
Class OlcbEventNameStore
- java.lang.Object
-
- jmri.jmrix.openlcb.OlcbEventNameStore
-
- All Implemented Interfaces:
EventNameStore
public final class OlcbEventNameStore extends java.lang.Object implements EventNameStore
JMRI's implementation of part of the OpenLcb EventNameStore interface.
-
-
Field Summary
Fields Modifier and Type Field Description boolean
dirty
-
Constructor Summary
Constructors Constructor Description OlcbEventNameStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMatch(EventID eventID, java.lang.String name)
Create a new name to/from EventID associationEventID
getEventID(java.lang.String name)
java.lang.String
getEventName(EventID eventID)
java.util.Set<EventID>
getMatches()
Get all the EventIDs availableboolean
hasEventID(java.lang.String name)
boolean
hasEventName(EventID eventID)
protected void
initShutdownTask()
void
readDetails()
void
writeEventNameDetails()
-
-
-
Field Detail
-
dirty
public boolean dirty
-
-
Constructor Detail
-
OlcbEventNameStore
public OlcbEventNameStore()
-
-
Method Detail
-
getEventName
public java.lang.String getEventName(EventID eventID)
- Specified by:
getEventName
in interfaceEventNameStore
- Parameters:
eventID
- The EventID being searched for- Returns:
- The name associated with that EventID or the event ID in dotted hex
-
hasEventName
public boolean hasEventName(EventID eventID)
- Parameters:
eventID
- The EventID being searched for- Returns:
- true if there is an associated name
-
getEventID
public EventID getEventID(java.lang.String name)
- Specified by:
getEventID
in interfaceEventNameStore
- Parameters:
name
- The event name being searched for- Returns:
- The EventID associated with that name or an event ID constructed from the input
-
hasEventID
public boolean hasEventID(java.lang.String name)
- Parameters:
name
- The event name being searched for- Returns:
- true if an EventID is associated with that name
-
addMatch
public void addMatch(EventID eventID, java.lang.String name)
Create a new name to/from EventID association- Parameters:
eventID
- associated EventIDname
- associated name
-
getMatches
public java.util.Set<EventID> getMatches()
Get all the EventIDs available- Returns:
- Set of all available EventIDs
-
readDetails
public void readDetails()
-
initShutdownTask
protected void initShutdownTask()
-
writeEventNameDetails
public void writeEventNameDetails() throws java.io.IOException
- Throws:
java.io.IOException
-
-