urv.olsr.data.mpr
Class OLSRSet
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.HashSet<OLSRNode>
urv.olsr.data.mpr.OLSRSet
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<OLSRNode>, java.util.Collection<OLSRNode>, java.util.Set<OLSRNode>, BandwidthUpdatable
- Direct Known Subclasses:
- MprSelectorSet, MprSet
public class OLSRSet
- extends java.util.HashSet<OLSRNode>
- implements BandwidthUpdatable
This class stores a set of OLSR nodes (no repeated)
which can be used for storing MPR and neighbor information
- Author:
- Marcel Arrufat Arias
- See Also:
- Serialized Form
Field Summary |
(package private) java.lang.Object |
lock
|
Method Summary |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
|
java.util.Set<OLSRNode> |
getCopyOfSet()
Returns a copy of the set, and prevents from concurrent
modifications |
void |
setCopyOfSet(java.util.List<OLSRNode> list)
Adds all elements to the data set
The data elements cannot be retrieved during
the copy operation |
void |
setCopyOfSet(java.util.Set<OLSRNode> set)
Adds all elements to the data set
The data elements cannot be retrieved during
the copy operation |
java.lang.String |
toString()
|
void |
updateBwOf(OLSRNode node)
|
Methods inherited from class java.util.HashSet |
add, clear, contains, isEmpty, iterator, remove, size |
Methods inherited from class java.util.AbstractSet |
hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
addAll, containsAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
addAll, containsAll, hashCode, removeAll, retainAll, toArray, toArray |
lock
java.lang.Object lock
OLSRSet
public OLSRSet()
clone
public java.lang.Object clone()
- Overrides:
clone
in class java.util.HashSet<OLSRNode>
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interface java.util.Collection<OLSRNode>
- Specified by:
equals
in interface java.util.Set<OLSRNode>
- Overrides:
equals
in class java.util.AbstractSet<OLSRNode>
toString
public java.lang.String toString()
- Overrides:
toString
in class java.util.AbstractCollection<OLSRNode>
updateBwOf
public void updateBwOf(OLSRNode node)
- Specified by:
updateBwOf
in interface BandwidthUpdatable
getCopyOfSet
public java.util.Set<OLSRNode> getCopyOfSet()
- Returns a copy of the set, and prevents from concurrent
modifications
- Returns:
setCopyOfSet
public void setCopyOfSet(java.util.List<OLSRNode> list)
- Adds all elements to the data set
The data elements cannot be retrieved during
the copy operation
- Parameters:
list
-
setCopyOfSet
public void setCopyOfSet(java.util.Set<OLSRNode> set)
- Adds all elements to the data set
The data elements cannot be retrieved during
the copy operation
- Parameters:
list
-