fr.lifl.jedi.model.interactionSelection.reactiveSelection
Class TupleSelectionPolicy

java.lang.Object
  extended by fr.lifl.jedi.model.interactionSelection.reactiveSelection.InteractionSelectionPolicy
      extended by fr.lifl.jedi.model.interactionSelection.reactiveSelection.TupleSelectionPolicy

public class TupleSelectionPolicy
extends InteractionSelectionPolicy

An interaction selection policy that performs selection directly on tuples.

Version:
JEDI V 2.2
Created the 7th nov. 2008
Modified the 5th may 2009
Author:
Yoann Kubera
SMAC Team (Systèmes Multi-Agents et Comportement)
LIFL (Laboratoire d'Informatique Fondamentale de Lille)
University of Lille, France

Field Summary
 
Fields inherited from class fr.lifl.jedi.model.interactionSelection.reactiveSelection.InteractionSelectionPolicy
DEFAULT_POLICY
 
Constructor Summary
TupleSelectionPolicy(ElementSelectionNature<AbstractRealizableTuple<?>> nature)
          Constructor of a tuple selection policy made with a particular nature.
 
Method Summary
 InteractionSelectionPolicy clone()
           
 AbstractRealizableTuple<?> performSelection(java.util.List<AbstractRealizableTuple<?>> affordances)
          Asks the policy to perform a selection among the realizable tuples list provided in parameter.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TupleSelectionPolicy

public TupleSelectionPolicy(ElementSelectionNature<AbstractRealizableTuple<?>> nature)
Constructor of a tuple selection policy made with a particular nature.

Parameters:
nature - The nature of the tuple selection. This parameter should not be null.
See Also:
ElementSelectionNature
Method Detail

performSelection

public AbstractRealizableTuple<?> performSelection(java.util.List<AbstractRealizableTuple<?>> affordances)
Description copied from class: InteractionSelectionPolicy
Asks the policy to perform a selection among the realizable tuples list provided in parameter.

Specified by:
performSelection in class InteractionSelectionPolicy
Parameters:
affordances - The realizable tuples list among which selection is made.
Returns:
The tuple selected in the list of realizable tuples.

Returns null if no tuple was selected.

See Also:
InteractionSelectionPolicy.performSelection(java.util.List)

clone

public InteractionSelectionPolicy clone()
Specified by:
clone in class InteractionSelectionPolicy
See Also:
InteractionSelectionPolicy.clone()

toString

public java.lang.String toString()
Specified by:
toString in class InteractionSelectionPolicy
See Also:
InteractionSelectionPolicy.toString()