Class DigipeatAliasRecord

java.lang.Object
org.ka2ddo.ax25.DigipeatAliasRecord
All Implemented Interfaces:
Comparable<DigipeatAliasRecord>

public class DigipeatAliasRecord extends Object implements Comparable<DigipeatAliasRecord>
This class defines all the parameters for an alias used for digipeating.
Author:
Andrew Pavlin, KA2DDO
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The 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

    Constructors
    Constructor
    Description
    Create an empty DigipeatAliasRecord.
    Create a DigipeatAliasRecord using string format attributes.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    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
    Returns a hash code value for the object.
    void
    Fill this record from data saved under the alias name in Java Preferences.
    Returns a string representation of the object.
    void
    Store this DigipeatAliasRecord in Java Preferences

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • alias

      public String alias
      The name of the alias, such as WIDE2. Should be an uppercase String.
    • isN_N

      public boolean isN_N
      Specify if this is an alias using the New n-N paradigm.
    • enabled

      public boolean enabled
      Specify if this digipeat alias is globally enabled for digipeating.
    • isTraced

      public boolean isTraced
      Specify 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

      public DigipeatAliasRecord(String alias, String params)
      Create a DigipeatAliasRecord using string format attributes.
      Parameters:
      alias - String name of alias
      params - 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

      public boolean equals(Object obj)
      Indicates whether some other object is "equal to" this one.
      Overrides:
      equals in class Object
      Parameters:
      obj - the reference object with which to compare.
      Returns:
      true if this object is the same as the obj argument; false otherwise.
      See Also:
    • 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 by java.util.Hashtable.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this object.
      See Also:
    • toString

      public String toString()
      Returns a string representation of the object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the object.
    • getAliasString

      public String getAliasString()
      Create a complete alias string, accounting for aliases using the New n-N paradigm.
      Returns:
      complete alias String
    • compareTo

      public int compareTo(DigipeatAliasRecord o)
      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 interface Comparable<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

      public void writeToPreferences(Preferences prefs)
      Store this DigipeatAliasRecord in Java Preferences
      Parameters:
      prefs - the Preferences node to contain the saved record data
    • readFromPreferences

      public void readFromPreferences(Preferences prefs)
      Fill this record from data saved under the alias name in Java Preferences.
      Parameters:
      prefs - Preferences node containing the saved data