javax.constraints.impl.search.selectors
Class VarSelectorInputOrder

java.lang.Object
  extended by javax.constraints.impl.search.selectors.AbstractVarSelector
      extended by javax.constraints.impl.search.selectors.VarSelectorInputOrder
All Implemented Interfaces:
VarSelector

public class VarSelectorInputOrder
extends AbstractVarSelector


Constructor Summary
VarSelectorInputOrder(SearchStrategy strategy)
          Constructor from the Var[]
 
Method Summary
 VarSelectorType getType()
          Returns a type of this selector
 int select()
          Returns the index of the selected variable in the array of constrained variables in order of definition.
 
Methods inherited from class javax.constraints.impl.search.selectors.AbstractVarSelector
getSearchStrategy, getVars
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VarSelectorInputOrder

public VarSelectorInputOrder(SearchStrategy strategy)
Constructor from the Var[]

Method Detail

getType

public VarSelectorType getType()
Description copied from interface: VarSelector
Returns a type of this selector

Returns:
a type of this selector

select

public int select()
Returns the index of the selected variable in the array of constrained variables in order of definition. If no variables to select, it returns -1;

Specified by:
select in interface VarSelector
Specified by:
select in class AbstractVarSelector
Returns:
the index of the selected variable in the array of constrained variables upon which this selector was defined. Returns -1 if there are no variables to select.