fr.ocelet.runtime.affectoperators
Class Any<T>

Package class diagram package Any
java.lang.Object
  extended by fr.ocelet.runtime.affectoperators.Any<T>
All Implemented Interfaces:
AffectOperator<T>

public class Any<T>
extends java.lang.Object
implements AffectOperator<T>

Returns one randomly chosen element from the given list

See Also:
AffectOperator

Constructor Summary
Any()
           
 
Method Summary
 T compute(java.util.ArrayList<T> future)
          Computes all the candidate values and produces one unique value of the same type to be used for property affectation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Any

public Any()
Method Detail

compute

public T compute(java.util.ArrayList<T> future)
Computes all the candidate values and produces one unique value of the same type to be used for property affectation.

Specified by:
compute in interface AffectOperator<T>
Parameters:
future - Vector of candidate values.
Returns:
One randomly chosen value from the argument future Vector.