net.jxta.impl.rendezvous.rpv
Class PeerViewRandomStrategy
java.lang.Object
net.jxta.impl.rendezvous.rpv.PeerViewRandomStrategy
- All Implemented Interfaces:
- PeerViewStrategy
final class PeerViewRandomStrategy
- extends Object
- implements PeerViewStrategy
Random without replacement
Method Summary |
PeerViewElement |
next()
Return the next PeerView Element using the strategy applied by this
instance. |
void |
reset()
Reset the strategy. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PeerViewRandomStrategy
PeerViewRandomStrategy(SortedSet set)
reset
public void reset()
- Reset the strategy. The meaning of reset depends entirely on the strategy
which is used to return peer view elements.
- Specified by:
reset
in interface PeerViewStrategy
next
public PeerViewElement next()
- Return the next PeerView Element using the strategy applied by this
instance.
- Specified by:
next
in interface PeerViewStrategy
- Returns:
- the next peer view element in sequence or null if the peerview
is empty.