choco.kernel.model
Class ModelObject

java.lang.Object
  extended by choco.kernel.model.VariableArray
      extended by choco.kernel.model.ModelObject
All Implemented Interfaces:
IPretty, IIndex, IOptions, IVariableArray, Serializable
Direct Known Subclasses:
AbstractConstraint, AbstractVariable

public class ModelObject
extends VariableArray
implements IOptions, IIndex

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class choco.kernel.model.VariableArray
VariableArray.VConstraintsDataStructure
 
Field Summary
 
Fields inherited from class choco.kernel.model.VariableArray
NO_CONSTRAINTS
 
Constructor Summary
ModelObject(boolean enableOptions)
           
ModelObject(Variable[] variables, boolean enableOptions)
           
 
Method Summary
 void addOption(String option)
          Add an option to the pool of option.
 void addOptions(List<String> options)
          Add a list of options to the pool of options of the object
 void addOptions(Set<String> options)
          Add a set of options to the pool of options of the object
 void addOptions(String options)
          Add several options to the pool of option.
 void addOptions(String[] options)
          Add an array of options to the pool of options of the object
 boolean containsOption(String option)
          check if the option is activated
 long getIndex()
          Unique index (Different from hashCode, can change from one execution to another one)
 List<String> getOptions()
          Get the pool of unique options
 int hashCode()
           
 String toString()
           
 
Methods inherited from class choco.kernel.model.VariableArray
cancelExtractVariables, doExtractVariables, extractVariables, forceExtractVariables, getNbVars, getVariable, getVariableIterator, getVariables, pretty, replaceBy, replaceByConstantAt, setVariables, setVariables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModelObject

public ModelObject(Variable[] variables,
                   boolean enableOptions)

ModelObject

public ModelObject(boolean enableOptions)
Method Detail

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

addOption

public void addOption(String option)
Description copied from interface: IOptions
Add an option to the pool of option.

Specified by:
addOption in interface IOptions

addOptions

public final void addOptions(String options)
Description copied from interface: IOptions
Add several options to the pool of option.

Specified by:
addOptions in interface IOptions

addOptions

public final void addOptions(String[] options)
Description copied from interface: IOptions
Add an array of options to the pool of options of the object

Specified by:
addOptions in interface IOptions
Parameters:
options - array of options

addOptions

public final void addOptions(List<String> options)
Description copied from interface: IOptions
Add a list of options to the pool of options of the object

Specified by:
addOptions in interface IOptions
Parameters:
options - set of options

addOptions

public final void addOptions(Set<String> options)
Description copied from interface: IOptions
Add a set of options to the pool of options of the object

Specified by:
addOptions in interface IOptions
Parameters:
options - set of options

getOptions

public final List<String> getOptions()
Description copied from interface: IOptions
Get the pool of unique options

Specified by:
getOptions in interface IOptions
Returns:
set of options

containsOption

public final boolean containsOption(String option)
Description copied from interface: IOptions
check if the option is activated

Specified by:
containsOption in interface IOptions
Returns:
true if the set contains the option

getIndex

public final long getIndex()
Description copied from interface: IIndex
Unique index (Different from hashCode, can change from one execution to another one)

Specified by:
getIndex in interface IIndex
Returns:
the indice of the objet

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.