All Packages Class Hierarchy This Package Previous Next Index
Class VisiModel.ATMAddress
java.lang.Object
|
+----VisiModel.NodeAddress
|
+----VisiModel.ATMAddress
- public class ATMAddress
- extends NodeAddress
Class definition for an ATM address.
- Version:
- $Revision: 1.5 $, $Date: 2000/10/12 14:09:09 $
- Author:
- John Cavanaugh, Mike Spengler
-
address
- The ATM address.
-
NSAP_FORMAT_DCC
-
-
NSAP_FORMAT_E164
-
-
NSAP_FORMAT_ICD
-
-
NSAP_LENGTH
-
-
SPANS_LENGTH
-
-
ATMAddress(String)
- Construct an ATM address.
-
equals(Object)
- Compares the ATM address against the specified object.
-
getAddress()
- Get the raw ATM address.
-
getHostAddress()
- Get a string representation of the ATM address.
-
hashCode()
- Get a hashcode for the ATM address.
-
hexStr(byte)
- Get a representation of a byte as a 2-character hex string.
-
isUnknown()
- Determines whether the address is an unknown address.
-
parseATMAddress(String)
- Parse a string containing an ATM address into a
byte array.
-
toString()
- Get a string describing the ATMAddress object.
SPANS_LENGTH
private static final int SPANS_LENGTH
NSAP_LENGTH
private static final int NSAP_LENGTH
NSAP_FORMAT_DCC
private static final byte NSAP_FORMAT_DCC
NSAP_FORMAT_ICD
private static final byte NSAP_FORMAT_ICD
NSAP_FORMAT_E164
private static final byte NSAP_FORMAT_E164
address
private byte address[]
- The ATM address.
ATMAddress
public ATMAddress(String addr) throws ParseException
- Construct an ATM address.
- Parameters:
- addr - The new address.
- Throws: ParseException
- If the parameter does not define a
valid ATM address.
getAddress
public byte[] getAddress()
- Get the raw ATM address.
- Returns:
- A byte array containing the ATM address.
isUnknown
public boolean isUnknown()
- Determines whether the address is an unknown address.
- Returns:
-
true is the address is an unknown address
- Overrides:
- isUnknown in class NodeAddress
parseATMAddress
public static byte[] parseATMAddress(String address) throws ParseException
- Parse a string containing an ATM address into a
byte array.
- Parameters:
- address - The ATM address to be parsed.
- Returns:
- A byte array containing the ATM
address.
- Throws: ParseException
- If the string does not define a
valid ATM address.
getHostAddress
public String getHostAddress()
- Get a string representation of the ATM address.
- Returns:
- A string with the character representation of
the ATM address.
- Overrides:
- getHostAddress in class NodeAddress
hexStr
private String hexStr(byte x)
- Get a representation of a byte as a 2-character hex string.
- Parameters:
- x - The byte to be converted to a string.
- Returns:
- A String with a 2-character hex
representation of the input byte.
hashCode
public int hashCode()
- Get a hashcode for the ATM address.
- Returns:
- An integer hash code.
- Overrides:
- hashCode in class Object
equals
public boolean equals(Object obj)
- Compares the ATM address against the specified object.
- Returns:
- True if the addresses have the same length and the
same value; false otherwise.
- Overrides:
- equals in class Object
toString
public String toString()
- Get a string describing the ATMAddress object.
- Returns:
- A string describing the ATMAddress object.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index