All Packages  This Package  Class Hierarchy  Class Search  Index

Interface aima.logic.Bindings

The Bindings interface is the basis for associating individual Variables with arbitrary JAVA Object values.

It is expected that in addition to the dynamic methods required by this interface, each implementation will also define a static method getEmpty() which will return a unique object representing a Bindings instance that contains no actual Variable bindings.

See Also: Variable


public interface  Bindings
{
          // Methods 6
     public abstract Bindings extendBindings(Variable, Object);
     public abstract Object getBinding(Variable);
     public abstract Bindings getFailure();
     public abstract boolean isBound(Variable);
     public abstract boolean isEmpty();
     public abstract boolean isFailure();
}



Methods


getFailure

   public abstract Bindings getFailure() 

Obtains the Failure (representing no consistent Bindings) object.

Returns:
The failure bindings object.


isFailure

   public abstract boolean isFailure() 

Determine if this Bindings object represents the Failure (no consistent bindings) object.

Returns:
true iff this object is the Failure bindings object.


isEmpty

   public abstract boolean isEmpty() 

Determine if this Bindings object represents the Empty (no current bindings) object.

It is expected that all implementations of the Bindings interface will provide a static method getEmpty() which will return a unique (to the particular implementation) object representing a Bindings instance that contains no actual Variable bindings. This isEmpty predicate is intended to test for that unique (to the implementation) object.

Returns:
true iff this object is the Empty bindings object.


isBound

   public abstract boolean isBound(Variable var) 

Determine if the given Variable is currently bound.

Parameter Description
var The variable to check.

Returns:
true iff the Variable is bound.


getBinding

   public abstract Object getBinding(Variable var) 

Get the current binding of the given Variable.

Parameter Description
var The variable to look up.

Returns:
The value associated with the variable.


extendBindings

   public abstract Bindings extendBindings(Variable var, 
                                           Object val) 

Extends this Bindings object with an association between the given Variable and value.

Note: A particular implementation is allowed, though not required, to change the Bindings object on which it is invoked if the variable is already bound in the Bindings object.

Parameter Description
var The variable to bind.
val The value to which the Variable is to be bound.

Returns:
An extended Bindings object.


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4