Package org.ka2ddo.yaac.aprs
Class LocalDestinationRecord
java.lang.Object
org.ka2ddo.yaac.aprs.LocalDestinationRecord
- All Implemented Interfaces:
Comparable<LocalDestinationRecord>
This class defines one local destination callsign record. This record type may also be
used for group multicasts for groups this station is a member of.
- Author:
- Andrew Pavlin, KA2DDO
-
Field Summary
Modifier and TypeFieldDescriptionThe callsign or group label for messages that should be considered as addressed to the local station.boolean
Flag indicating whether this LocalDestinationRecord should be used.The event type (if any) that should be reported for messages received for this callsign. -
Constructor Summary
ConstructorDescriptionCreate an empty LocalDestinationRecord suitable for editing through a GUI interface.LocalDestinationRecord
(String callsign) Create a LocalDestinationRecord for a specific callsign or group label.LocalDestinationRecord
(String callsign, boolean enabled) Create a LocalDestinationRecord for a specific callsign or group label with no associated event type. -
Method Summary
Modifier and TypeMethodDescriptionint
Compares this object with the specified object for order.boolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for the object.void
readFromPreferences
(Preferences prefs) Load this callsign-named record from the specified Preferences node.toString()
Returns a string representation of the object.void
writeToPreferences
(Preferences prefs) Store the contents of this record in a Java Preferences node.
-
Field Details
-
callsign
The callsign or group label for messages that should be considered as addressed to the local station. -
enabled
public boolean enabledFlag indicating whether this LocalDestinationRecord should be used. -
eventType
The event type (if any) that should be reported for messages received for this callsign.
-
-
Constructor Details
-
LocalDestinationRecord
public LocalDestinationRecord()Create an empty LocalDestinationRecord suitable for editing through a GUI interface. Initially disabled until something later fills it in. -
LocalDestinationRecord
Create a LocalDestinationRecord for a specific callsign or group label. Initially disabled and with no event type.- Parameters:
callsign
- String of callsign or group label
-
LocalDestinationRecord
Create a LocalDestinationRecord for a specific callsign or group label with no associated event type.- Parameters:
callsign
- String of callsign or group labelenabled
- boolean true if this record should be enabled
-
-
Method Details
-
equals
Indicates whether some other object is "equal to" this one. -
hashCode
public int hashCode()Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided byjava.util.Hashtable
. -
toString
Returns a string representation of the object. -
compareTo
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.- Specified by:
compareTo
in interfaceComparable<LocalDestinationRecord>
- Parameters:
o
- the object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
- Throws:
ClassCastException
- if the specified object's type prevents it from being compared to this object.
-
writeToPreferences
Store the contents of this record in a Java Preferences node.- Parameters:
prefs
- Preferences node to hold the saved value
-
readFromPreferences
Load this callsign-named record from the specified Preferences node.- Parameters:
prefs
- Preferences node with a key-value pair matching the callsign of this record
-