All Packages  This Package  Class Hierarchy  Class Search  Index

Class aima.logic.ListBindings

java.lang.Object
   |
   +----aima.logic.ListBindings

The ListBindings class implements the Bindings interface using a DottedPair (association list) representation.

See Also: DottedPair


public class  ListBindings
     extends java.lang.Object
     implements aima.logic.Bindings
{
          // Methods 9
     public Bindings extendBindings(Variable, Object);
     public Object getBinding(Variable);
     public static Bindings getEmpty();
     public Bindings getFailure();
     public boolean isBound(Variable);
     public boolean isEmpty();
     public boolean isFailure();
     public static void main(String[]);
     public String toString();
}



Methods


getFailure

   public Bindings getFailure() 

Obtains the Failure (representing no consistent Bindings) object.

Returns:
The failure bindings object.
Implements:
getFailure in interface Bindings


getEmpty

   public static Bindings getEmpty() 

Obtains the Empty (representing no current Bindings) object.

Returns:
The empty bindings object.


isEmpty

   public boolean isEmpty() 

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

Returns:
true iff this object is the Empty bindings object.
Implements:
isEmpty in interface Bindings


isFailure

   public boolean isFailure() 

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

Returns:
true iff this object is the Failure bindings object.
Implements:
isFailure in interface Bindings


isBound

   public 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.
Implements:
isBound in interface Bindings


getBinding

   public 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.
Implements:
getBinding in interface Bindings


extendBindings

   public Bindings extendBindings(Variable var, 
                                  Object val) 

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

Note: This method does not change the contents of the ListBindings object on which it is invoked, which may make it more appropriate for theorem-proving applications.

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

Returns:
An extended ListBindings object.
Implements:
extendBindings in interface Bindings


toString

   public String toString() 

Returns a String representation of this object.

Returns:
a String representation of this object.
Overrides:
toString in class Object


main

   public static void main(String[] args) 

Tests out the functionality of this class.

Parameter Description
args Ignored.



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