swarm.collections
Class ListShufflerImpl

java.lang.Object
  |
  +--swarm.collections.ListShufflerImpl

public class ListShufflerImpl
extends Object
implements CreateS, Create, DropS, Drop, ListShufflerS, ListShuffler

A class to randomize the order of a given Swarm List. ListShuffler randomizes the order of the elements in a List; either the whole list or the num lowest elements. The list must be supplied. An uniform distribution can be supplied, or the system- supplied uniformUnsRand is used. The algorithm is from Knuth. All these methods modify the underlying collection, so any indexes should always be regenerated.


Constructor Summary
ListShufflerImpl()
           
ListShufflerImpl(Zone aZone)
          Default constructor for Impl class
ListShufflerImpl(Zone aZone, Object dist)
          The create:setUniformRandom method creates the Shuffler and connects the supplied distribution object.
 
Methods implemented by this class for interface swarm.defobj.Drop
drop
 
Methods implemented by this class for interface swarm.collections.ListShuffler
shufflePartialList$Num, shuffleWholeList
 
Methods implemented by this class for interface swarm.defobj.DefinedObject
compare, describe, describeID, getDisplayName, getTypeName, getZone, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListShufflerImpl

public ListShufflerImpl()

ListShufflerImpl

public ListShufflerImpl(Zone aZone,
                        Object dist)
The create:setUniformRandom method creates the Shuffler and connects the supplied distribution object.

ListShufflerImpl

public ListShufflerImpl(Zone aZone)
Default constructor for Impl class