fr.inria.oadymppac.solver
Class ExceptionManager

java.lang.Object
  extended byfr.inria.oadymppac.utils.ObjectManagerImpl
      extended byfr.inria.oadymppac.solver.ExceptionManager
All Implemented Interfaces:
Indexable, ObjectManager, SolverManagable

public class ExceptionManager
extends ObjectManagerImpl
implements SolverManagable, Indexable

A VariableManager is a utility class that manages the domain of all the variables declared and used during a session. It keeps track of the domains and notifies listeners when the domains change.

Version:
$Revision: 1.1 $
Author:
Jean-Daniel Fekete, Mohammad Ghoniem

Field Summary
static java.lang.String PROPERTY_NAME
           
 
Fields inherited from interface fr.inria.oadymppac.utils.ObjectManager
INVALID
 
Constructor Summary
ExceptionManager()
          protected constructor.
 
Method Summary
 int add(java.lang.Exception exception)
          When a NewVariableEvent is received, the corresponding variable is added to the list of variables.
 int add(java.lang.Object o)
           
 java.lang.Exception get(int index)
          Returns the index's created variable.
 int getCount()
          Return the number of variables in the manager.
static ExceptionManager getExceptionManager(Solver solver)
           
 java.lang.Object getFromIndex(int index)
           
 java.lang.Object getFromKey(java.lang.Object key)
           
 int getIndex()
           
 int getIndex(java.lang.Object key)
           
 java.lang.Object getKey()
           
 Solver getSolver()
           
 java.util.Iterator iterator()
          Return the iterator on all the variables.
 void reset()
           
 void setIndex(int index)
           
 void setSolver(Solver solver)
           
 
Methods inherited from class fr.inria.oadymppac.utils.ObjectManagerImpl
getOwner, setOwner
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_NAME

public static final java.lang.String PROPERTY_NAME
See Also:
Constant Field Values
Constructor Detail

ExceptionManager

public ExceptionManager()
protected constructor.

Method Detail

get

public java.lang.Exception get(int index)
Returns the index's created variable.


getCount

public int getCount()
Return the number of variables in the manager.

Specified by:
getCount in interface ObjectManager
Specified by:
getCount in class ObjectManagerImpl

iterator

public java.util.Iterator iterator()
Return the iterator on all the variables.

Specified by:
iterator in interface ObjectManager
Specified by:
iterator in class ObjectManagerImpl

getExceptionManager

public static ExceptionManager getExceptionManager(Solver solver)

add

public int add(java.lang.Exception exception)
When a NewVariableEvent is received, the corresponding variable is added to the list of variables.


getSolver

public Solver getSolver()
Specified by:
getSolver in interface SolverManagable
Returns:
Returns the solver.

setSolver

public void setSolver(Solver solver)
Specified by:
setSolver in interface SolverManagable
Parameters:
solver - The solver to set.

getIndex

public int getIndex()
Specified by:
getIndex in interface Indexable

getKey

public java.lang.Object getKey()
Specified by:
getKey in interface Indexable

setIndex

public void setIndex(int index)
Specified by:
setIndex in interface Indexable

getFromIndex

public java.lang.Object getFromIndex(int index)
Specified by:
getFromIndex in interface ObjectManager
Specified by:
getFromIndex in class ObjectManagerImpl

getFromKey

public java.lang.Object getFromKey(java.lang.Object key)
Specified by:
getFromKey in interface ObjectManager
Specified by:
getFromKey in class ObjectManagerImpl

getIndex

public int getIndex(java.lang.Object key)
Specified by:
getIndex in interface ObjectManager
Specified by:
getIndex in class ObjectManagerImpl

add

public int add(java.lang.Object o)
Specified by:
add in interface ObjectManager
Parameters:
o -
Returns:

reset

public void reset()
Specified by:
reset in interface Indexable