soot.toolkits.scalar
Class CollectionFlowUniverse

java.lang.Object
  extended bysoot.toolkits.scalar.CollectionFlowUniverse
All Implemented Interfaces:
FlowUniverse

public class CollectionFlowUniverse
extends Object
implements FlowUniverse

Provides an implementation of a flow universe, wrapping collections.


Constructor Summary
CollectionFlowUniverse(Collection elements)
           
 
Method Summary
 Iterator iterator()
          returns an iterator over the elements of the universe.
 int size()
          returns the number of elements of the universe.
 Object[] toArray()
          returns the elements of the universe in form of an array.
The returned array could be backed or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionFlowUniverse

public CollectionFlowUniverse(Collection elements)
Method Detail

size

public int size()
Description copied from interface: FlowUniverse
returns the number of elements of the universe.

Specified by:
size in interface FlowUniverse
Returns:
the size of the universe.

iterator

public Iterator iterator()
Description copied from interface: FlowUniverse
returns an iterator over the elements of the universe.

Specified by:
iterator in interface FlowUniverse
Returns:
an Iterator over the elements.

toArray

public Object[] toArray()
Description copied from interface: FlowUniverse
returns the elements of the universe in form of an array.
The returned array could be backed or not. If you want to be sure that it is unbacked, clone() it.

Specified by:
toArray in interface FlowUniverse
Returns:
the elements of the universe.