net.jolsrv2.repository.topology
Class TopologyTuple

java.lang.Object
  extended by net.jolsrv2.repository.topology.TopologyTuple

public class TopologyTuple
extends java.lang.Object

The class implements the topology set, as specified in OLSRv2.

Author:
Andreas Schjønhaug

Constructor Summary
TopologyTuple(java.net.InetAddress destination, java.net.InetAddress lastHop, int ansn)
          Constructor
 
Method Summary
 int getAnsn()
          Returns the ANSN
 java.net.InetAddress getDestination()
          Returns the destination IP address
 java.net.InetAddress getLastHop()
          Returns the last hop
 long getTime()
          Returns the time
 void setTime(long time)
          Sets the time
 java.lang.String toString()
          Method providing a nicely formatted String of the topology tuple
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TopologyTuple

public TopologyTuple(java.net.InetAddress destination,
                     java.net.InetAddress lastHop,
                     int ansn)
Constructor

Parameters:
destination - the destination IP address
lastHop - the IP address of the last hop
ansn - the ANSN
Method Detail

getDestination

public java.net.InetAddress getDestination()
Returns the destination IP address

Returns:
the destination IP address

getLastHop

public java.net.InetAddress getLastHop()
Returns the last hop

Returns:
the last hop

getAnsn

public int getAnsn()
Returns the ANSN

Returns:
the ANSN

getTime

public long getTime()
Returns the time

Returns:
the time

setTime

public void setTime(long time)
Sets the time

Parameters:
time - the time

toString

public java.lang.String toString()
Method providing a nicely formatted String of the topology tuple

Overrides:
toString in class java.lang.Object
Returns:
the nicely formatted topology tuple