DRCL JavaSim API

drcl.inet.data
Class NetAddress

java.lang.Object
  |
  +--drcl.DrclObj
        |
        +--drcl.inet.data.NetAddress
All Implemented Interfaces:
java.lang.Cloneable, ObjectDuplicable, java.io.Serializable

public class NetAddress
extends DrclObj

The network address class. A network address consists of an address and an address mask. The network address is associated with an interface of a node. It represents what network the outside world see from that interface. It is particularly useful at the edge interfaces of a domain or a network.

Version:
1.0, 10/17/2000
Author:
Hung-ying Tyan
See Also:
Serialized Form

Constructor Summary
NetAddress()
           
NetAddress(long addr_, int nmaskbits_)
           
NetAddress(long addr_, long mask_)
           
 
Method Summary
 void duplicate(java.lang.Object source_)
          opies the content of the source_ object to this object.
 boolean equals(java.lang.Object o_)
           
 long getAddress()
           
 long getMask()
           
static long getMask(int nmaskbits_)
           
 long getMaskedAddress()
           
static int getNumMaskBits(long mask_)
           
 void setAddress(long a_)
           
 void setMask(long m_)
           
 java.lang.String toString()
           
 
Methods inherited from class drcl.DrclObj
clone
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NetAddress

public NetAddress()

NetAddress

public NetAddress(long addr_,
                  long mask_)

NetAddress

public NetAddress(long addr_,
                  int nmaskbits_)
Parameters:
nmaskbits - number of 0's in the mask.
Method Detail

getMask

public static long getMask(int nmaskbits_)

getNumMaskBits

public static int getNumMaskBits(long mask_)

getAddress

public long getAddress()

setAddress

public void setAddress(long a_)

getMask

public long getMask()

setMask

public void setMask(long m_)

getMaskedAddress

public long getMaskedAddress()

duplicate

public void duplicate(java.lang.Object source_)
Description copied from class: DrclObj
opies the content of the source_ object to this object. he subclass must implement this method to realize DrclObj.clone().
Overrides:
duplicate in class DrclObj

equals

public boolean equals(java.lang.Object o_)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class DrclObj

DRCL JavaSim API

Copyright © 2001 - DRCL, OSU     ~ Back to JavaSim Home ~