Project JXTA

net.jxta.impl.rendezvous.rpv
Class PeerViewRandomStrategy

java.lang.Object
  extended bynet.jxta.impl.rendezvous.rpv.PeerViewRandomStrategy
All Implemented Interfaces:
PeerViewStrategy

final class PeerViewRandomStrategy
extends Object
implements PeerViewStrategy

Random without replacement


Constructor Summary
(package private) PeerViewRandomStrategy(SortedSet set)
           
 
Method Summary
 PeerViewElement next()
          Return the next PeerView Element using the strategy applied by this instance.
 void reset()
          Reset the strategy. The meaning of reset depends entirely on the strategy which is used to return peer view elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeerViewRandomStrategy

PeerViewRandomStrategy(SortedSet set)
Method Detail

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.

JXTA J2SE