|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.SPT.SPT_ID | +--hypercast.SPT.SPT_LogicalAddress
A logical address on the Spanning Tree Network.
Field Summary | |
static int |
ADDRESS_ARRAY_SIZE
|
Constructor Summary | |
SPT_LogicalAddress(byte[] array,
int offset)
Constructor Reads id from a byte array. |
|
SPT_LogicalAddress(hypercast.INETv4OnePort a)
Constructor Construct the address with ip address |
|
SPT_LogicalAddress(int id)
constructor with the integer value |
|
SPT_LogicalAddress(hypercast.SPT.SPT_LogicalAddress sptla)
Constructor |
|
SPT_LogicalAddress(java.lang.String s)
Constructor |
Method Summary | |
void |
changeLogicalAddress(hypercast.SPT.SPT_LogicalAddress newAddr)
|
boolean |
equals(java.lang.Object o)
Compares to another SPT_ID |
int |
getId()
|
int |
getSize()
Returns the size of byte[] used to store address. |
boolean |
greaterThan(hypercast.I_Address a)
Checks if an I_address object is greater than this one. |
static boolean |
greaterThan(hypercast.SPT.SPT_ID a,
hypercast.SPT.SPT_ID b)
|
int |
hashCode()
Returns the hashcode of this object |
boolean |
isBetterThan(hypercast.I_Address b)
SPT node use this function to determine which node is better for root/parent |
void |
setId(int id)
Set the id |
byte[] |
toByteArray()
Converts the object into a byte array for transfer in a message. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface hypercast.I_Address |
equals, hashCode |
Field Detail |
public static final int ADDRESS_ARRAY_SIZE
Constructor Detail |
public SPT_LogicalAddress(int id)
id
- the ID in the integer formpublic SPT_LogicalAddress(hypercast.SPT.SPT_LogicalAddress sptla)
sptla
- a spt logical addresspublic SPT_LogicalAddress(byte[] array, int offset)
array
- the byte arrayoffset
- the offset to read the arraypublic SPT_LogicalAddress(java.lang.String s)
s
- the logical address in string formpublic SPT_LogicalAddress(hypercast.INETv4OnePort a)
a
- the ip addressMethod Detail |
public void changeLogicalAddress(hypercast.SPT.SPT_LogicalAddress newAddr)
public boolean greaterThan(hypercast.I_Address a)
I_Address
greaterThan
in interface I_Address
I_Address.greaterThan(hypercast.I_Address)
public boolean isBetterThan(hypercast.I_Address b)
b
- an address object
public int getSize()
getSize
in interface I_Address
public byte[] toByteArray()
toByteArray
in interface I_Address
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- an SPT_ID object
IllegalArgumentException,
- if the object is not an instance of SPT_IDpublic int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public int getId()
public void setId(int id)
id
- public static final boolean greaterThan(hypercast.SPT.SPT_ID a, hypercast.SPT.SPT_ID b)
a
comes before b
in
the total ordering of points.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |