public class DigipeatAliasCatalog extends java.lang.Object implements java.lang.Iterable<DigipeatAliasRecord>
Modifier and Type | Method and Description |
---|---|
void |
addRow()
Add an empty digipeat alias definition to the catalog (used for user data entry of a new alias).
|
void |
addRow(DigipeatAliasRecord dar)
Add a pre-filled-in digipeat alias to the catalog,
|
void |
deleteRow(int rowIndex)
Deletes the specified alias row from the catalog.
|
DigipeatAliasRecord |
getDigipeatRecord(java.lang.String baseCallsign)
Get a Digipeat alias record corresponding to the specified digipeater callsign, if
such a record exists.
|
DigipeatAliasRecord |
getEnabledDigipeatRecord(AX25Callsign callsign)
Get a Digipeat alias record corresponding to the specified digipeater callsign, if
such a record exists and is enabled.
|
static DigipeatAliasCatalog |
getInstance()
Get a reference to the singleton DigipeatAliasCatalog.
|
java.lang.String |
getRegionCode()
Identify what appears to be a regional alias base in the list of known aliases,
if one exists.
|
DigipeatAliasRecord |
getRow(int rowIndex)
Get the Nth DigipeatAliasRecord in the catalog.
|
int |
getRowCount()
Get the number of defined digipeat aliases.
|
static boolean |
isRelayAStep(AX25Callsign relay)
Test if this callsign looks like a digipeat New-N alias.
|
java.util.Iterator<DigipeatAliasRecord> |
iterator()
Returns an iterator over the catalog of DigipeatAliasRecords.
|
static void |
loadDefaults(java.util.prefs.Preferences aliasNode)
Load the catalog with the factory defaults.
|
public static DigipeatAliasCatalog getInstance()
public static void loadDefaults(java.util.prefs.Preferences aliasNode)
aliasNode
- Preferences node in which to store the catalog entriespublic int getRowCount()
public void addRow()
public void addRow(DigipeatAliasRecord dar)
dar
- DigipeatAliasRecord to addjava.lang.IllegalArgumentException
- if alias already exists in catalogpublic void deleteRow(int rowIndex)
rowIndex
- zero-based index of alias to deletepublic DigipeatAliasRecord getRow(int rowIndex)
rowIndex
- zero-based row indexpublic DigipeatAliasRecord getDigipeatRecord(java.lang.String baseCallsign)
baseCallsign
- String callsign to search forpublic DigipeatAliasRecord getEnabledDigipeatRecord(AX25Callsign callsign)
callsign
- String callsign to search forpublic static boolean isRelayAStep(AX25Callsign relay)
relay
- digipeater AX25Callsign to testpublic java.util.Iterator<DigipeatAliasRecord> iterator()
iterator
in interface java.lang.Iterable<DigipeatAliasRecord>
public java.lang.String getRegionCode()