Package org.ka2ddo.ax25
Class DigipeatAliasRecord
java.lang.Object
org.ka2ddo.ax25.DigipeatAliasRecord
- All Implemented Interfaces:
Comparable<DigipeatAliasRecord>
This class defines all the parameters for an alias used for digipeating.
- Author:
- Andrew Pavlin, KA2DDO
-
Field Summary
Modifier and TypeFieldDescriptionThe name of the alias, such as WIDE2.boolean
Specify if this digipeat alias is globally enabled for digipeating.boolean
Specify if this is an alias using the New n-N paradigm.boolean
Specify whether digipeats using this alias should have trace callsigns inserted into the digipeat path of the AX.25 frame. -
Constructor Summary
ConstructorDescriptionCreate an empty DigipeatAliasRecord.DigipeatAliasRecord
(String alias, String params) Create a DigipeatAliasRecord using string format attributes. -
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.Create a complete alias string, accounting for aliases using the New n-N paradigm.int
hashCode()
Returns a hash code value for the object.void
readFromPreferences
(Preferences prefs) Fill this record from data saved under the alias name in Java Preferences.toString()
Returns a string representation of the object.void
writeToPreferences
(Preferences prefs) Store this DigipeatAliasRecord in Java Preferences
-
Field Details
-
alias
The name of the alias, such as WIDE2. Should be an uppercase String. -
isN_N
public boolean isN_NSpecify if this is an alias using the New n-N paradigm. -
enabled
public boolean enabledSpecify if this digipeat alias is globally enabled for digipeating. -
isTraced
public boolean isTracedSpecify whether digipeats using this alias should have trace callsigns inserted into the digipeat path of the AX.25 frame.
-
-
Constructor Details
-
DigipeatAliasRecord
public DigipeatAliasRecord()Create an empty DigipeatAliasRecord. -
DigipeatAliasRecord
Create a DigipeatAliasRecord using string format attributes.- Parameters:
alias
- String name of aliasparams
- String of comma-separated boolean strings, indicating whether this is a n-N alias, the alias is enabled, and whether this alias should be traced
-
-
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. -
getAliasString
Create a complete alias string, accounting for aliases using the New n-N paradigm.- Returns:
- complete alias String
-
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<DigipeatAliasRecord>
- 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 this DigipeatAliasRecord in Java Preferences- Parameters:
prefs
- the Preferences node to contain the saved record data
-
readFromPreferences
Fill this record from data saved under the alias name in Java Preferences.- Parameters:
prefs
- Preferences node containing the saved data
-