Project JXTA

net.jxta.impl.rendezvous.rpv
Class PeerViewRandomWithReplaceStrategy

java.lang.Object
  extended by net.jxta.impl.rendezvous.rpv.PeerViewRandomWithReplaceStrategy
All Implemented Interfaces:
PeerViewStrategy

 class PeerViewRandomWithReplaceStrategy
extends Object
implements PeerViewStrategy

Random with replacement


Constructor Summary
PeerViewRandomWithReplaceStrategy(SortedSet set)
           
 
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
 

Constructor Detail

PeerViewRandomWithReplaceStrategy

PeerViewRandomWithReplaceStrategy(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