public class LocalDestinationRecord extends java.lang.Object implements java.lang.Comparable<LocalDestinationRecord>
Modifier and Type | Field and Description |
---|---|
java.lang.String |
callsign
The callsign or group label for messages that should be considered as addressed to the local station.
|
boolean |
enabled
Flag indicating whether this LocalDestinationRecord should be used.
|
MsgEventType |
eventType
The event type (if any) that should be reported for messages received for this callsign.
|
Constructor and Description |
---|
LocalDestinationRecord()
Create an empty LocalDestinationRecord suitable for editing through a GUI interface.
|
LocalDestinationRecord(java.lang.String callsign)
Create a LocalDestinationRecord for a specific callsign or group label.
|
LocalDestinationRecord(java.lang.String callsign,
boolean enabled)
Create a LocalDestinationRecord for a specific callsign or group label with no associated event type.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(LocalDestinationRecord o)
Compares this object with the specified object for order.
|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
int |
hashCode()
Returns a hash code value for the object.
|
void |
readFromPreferences(java.util.prefs.Preferences prefs)
Load this callsign-named record from the specified Preferences node.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
void |
writeToPreferences(java.util.prefs.Preferences prefs)
Store the contents of this record in a Java Preferences node.
|
public java.lang.String callsign
public boolean enabled
public MsgEventType eventType
public LocalDestinationRecord()
public LocalDestinationRecord(java.lang.String callsign)
callsign
- String of callsign or group labelpublic LocalDestinationRecord(java.lang.String callsign, boolean enabled)
callsign
- String of callsign or group labelenabled
- boolean true if this record should be enabledpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.hashCode()
public int hashCode()
java.util.Hashtable
.hashCode
in class java.lang.Object
equals(java.lang.Object)
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(LocalDestinationRecord o)
compareTo
in interface java.lang.Comparable<LocalDestinationRecord>
o
- the object to be compared.java.lang.ClassCastException
- if the specified object's type prevents it
from being compared to this object.public void writeToPreferences(java.util.prefs.Preferences prefs)
prefs
- Preferences node to hold the saved valuepublic void readFromPreferences(java.util.prefs.Preferences prefs)
prefs
- Preferences node with a key-value pair matching the callsign of this record