Package soot.toolkits.scalar
Class ArrayFlowUniverse<E>
- java.lang.Object
-
- soot.toolkits.scalar.ArrayFlowUniverse<E>
-
- All Implemented Interfaces:
Iterable<E>,FlowUniverse<E>
public class ArrayFlowUniverse<E> extends Object implements FlowUniverse<E>
Provides an implementation of a flow universe, wrapping arrays.
-
-
Constructor Summary
Constructors Constructor Description ArrayFlowUniverse(E[] elements)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<E>iterator()returns an iterator over the elements of the universe.intsize()returns the number of elements of the universe.E[]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
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
elements
protected final E[] elements
-
-
Constructor Detail
-
ArrayFlowUniverse
public ArrayFlowUniverse(E[] elements)
-
-
Method Detail
-
size
public int size()
Description copied from interface:FlowUniversereturns the number of elements of the universe.- Specified by:
sizein interfaceFlowUniverse<E>- Returns:
- the size of the universe.
-
iterator
public Iterator<E> iterator()
Description copied from interface:FlowUniversereturns an iterator over the elements of the universe.
-
toArray
public E[] toArray()
Description copied from interface:FlowUniversereturns 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:
toArrayin interfaceFlowUniverse<E>- Returns:
- the elements of the universe.
-
-