net.jolsrv2.repository.processforward
Class RelaySet

java.lang.Object
  extended by net.jolsrv2.repository.processforward.RelaySet

public class RelaySet
extends java.lang.Object

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

Author:
Andreas Schjønhaug

Method Summary
 void add(java.net.InetAddress address)
          Adds an IP address to the relay set
 void clear()
          The method deletes all relay tuples
 java.lang.Object clone()
          Implementation of the singleton design pattern.
 boolean contains(java.net.InetAddress address)
          Checks if the realy set contains a received tuple with having a certain IP address
static RelaySet getRelaySet()
          Implementation of the singleton design pattern
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRelaySet

public static RelaySet getRelaySet()
Implementation of the singleton design pattern

Returns:
the relay set

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Implementation of the singleton design pattern. This method is used to ensure that the class can not be cloned.

Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

contains

public boolean contains(java.net.InetAddress address)
Checks if the realy set contains a received tuple with having a certain IP address

Parameters:
address -
Returns:
true if the received tuple exists

clear

public void clear()
The method deletes all relay tuples


add

public void add(java.net.InetAddress address)
Adds an IP address to the relay set

Parameters:
address - IP address