javax.constraints.impl
Class CommonBase

java.lang.Object
  extended by javax.constraints.impl.CommonBase
Direct Known Subclasses:
AbstractConstrainedVariable, AbstractConstraint, AbstractReversible, AbstractSearchStrategy

public class CommonBase
extends java.lang.Object

This is a base implementation for all types of problem objects that refer to the problem and have an associated name, business objects, implementation, etc.


Constructor Summary
CommonBase(Problem problem)
           
CommonBase(Problem problem, java.lang.String name)
           
 
Method Summary
 java.lang.Object getImpl()
          This method should be defined by a concrete solver implementation.
 java.lang.String getName()
          Returns the name of this object.
 java.lang.Object getObject()
          This method may be used to get an attached Business Object for this object.
 Problem getProblem()
           
 void setImpl(java.lang.Object impl)
          This method defines an Object that represents an actual implementation of this object inside a concrete solver.
 void setName(java.lang.String name)
          Sets the name of this object.
 void setObject(java.lang.Object obj)
          This method may be used to attach a business object to this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonBase

public CommonBase(Problem problem)

CommonBase

public CommonBase(Problem problem,
                  java.lang.String name)
Method Detail

getImpl

public final java.lang.Object getImpl()
This method should be defined by a concrete solver implementation. This method returns an Object that represents an actual implementation of this object inside an underlying solver.

Returns:
an Object that represents an actual implementation of this Constrained Object inside an underlying solver.

getName

public java.lang.String getName()
Returns the name of this object.

Returns:
the name of this object.

getObject

public final java.lang.Object getObject()
This method may be used to get an attached Business Object for this object.

Returns:
the Business Object attached to this object.

getProblem

public Problem getProblem()

setImpl

public final void setImpl(java.lang.Object impl)
This method defines an Object that represents an actual implementation of this object inside a concrete solver.

Parameters:
impl - the Object that represents an actual implementation of this object inside a implementation solver.

setName

public void setName(java.lang.String name)
Sets the name of this object.

Parameters:
name - the name for this object.

setObject

public final void setObject(java.lang.Object obj)
This method may be used to attach a business object to this object.

Parameters:
obj - the business object being attached.