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

Variable Index

 o address
The ATM address.
 o NSAP_FORMAT_DCC
 o NSAP_FORMAT_E164
 o NSAP_FORMAT_ICD
 o NSAP_LENGTH
 o SPANS_LENGTH

Constructor Index

 o ATMAddress(String)
Construct an ATM address.

Method Index

 o equals(Object)
Compares the ATM address against the specified object.
 o getAddress()
Get the raw ATM address.
 o getHostAddress()
Get a string representation of the ATM address.
 o hashCode()
Get a hashcode for the ATM address.
 o hexStr(byte)
Get a representation of a byte as a 2-character hex string.
 o isUnknown()
Determines whether the address is an unknown address.
 o parseATMAddress(String)
Parse a string containing an ATM address into a byte array.
 o toString()
Get a string describing the ATMAddress object.

Variables

 o SPANS_LENGTH
 private static final int SPANS_LENGTH
 o NSAP_LENGTH
 private static final int NSAP_LENGTH
 o NSAP_FORMAT_DCC
 private static final byte NSAP_FORMAT_DCC
 o NSAP_FORMAT_ICD
 private static final byte NSAP_FORMAT_ICD
 o NSAP_FORMAT_E164
 private static final byte NSAP_FORMAT_E164
 o address
 private byte address[]
The ATM address.

Constructors

 o 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.

Methods

 o getAddress
 public byte[] getAddress()
Get the raw ATM address.

Returns:
A byte array containing the ATM address.
 o 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
 o 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.
 o 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
 o 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.
 o hashCode
 public int hashCode()
Get a hashcode for the ATM address.

Returns:
An integer hash code.
Overrides:
hashCode in class Object
 o 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
 o 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