Package org.ka2ddo.yaac.gui
Class SelectableSymbol
java.lang.Object
org.ka2ddo.yaac.gui.SelectableSymbol
- All Implemented Interfaces:
Serializable
,Comparable<SelectableSymbol>
This class is a wrapper around a pair of characters representing an APRS symbol.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionfinal char
The APRS symbol code for this symbol.final char
The APRS symbol table ID ('/' or '\') or overlay character (0-9 or A-Z) for this symbol. -
Constructor Summary
ConstructorDescriptionSelectableSymbol
(char symTableId, char symbolCode) Construct a SelectableSymbol for the specified APRS symTableId and symbolCode characters. -
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.static SelectableSymbol[]
getTypeCodes
(boolean withLeadingNull) Provide a list of all standard symbol combinations, with a null default.int
hashCode()
Returns a hash code value for the object.toString()
Returns a string representation of the object.static SelectableSymbol
valueOf
(char symTableId, char symbolCode) Return a SelectableSymbol object corresponding to the specified pair of characters.
-
Field Details
-
symTableId
public final char symTableIdThe APRS symbol table ID ('/' or '\') or overlay character (0-9 or A-Z) for this symbol. -
symbolCode
public final char symbolCodeThe APRS symbol code for this symbol.
-
-
Constructor Details
-
SelectableSymbol
public SelectableSymbol(char symTableId, char symbolCode) Construct a SelectableSymbol for the specified APRS symTableId and symbolCode characters.- Parameters:
symTableId
- printable ASCII character for the symbol table ID or overlaysymbolCode
- printable ASCII character for the symbol code
-
-
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<SelectableSymbol>
- 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.
-
valueOf
Return a SelectableSymbol object corresponding to the specified pair of characters. Cache objects to reduce the amount of wasted memory for common symbol combinations.- Parameters:
symTableId
- char symbol table identifiersymbolCode
- char code for the specific symbol within the specified table- Returns:
- SelectableSymbol object representing the pair of characters
-
getTypeCodes
Provide a list of all standard symbol combinations, with a null default.- Parameters:
withLeadingNull
- boolean true if a null leading entry should be in the returned array for "no symbol specified yet"- Returns:
- array of SelectableSymbol records
-