All Packages This Package Class Hierarchy Class Search Index
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();
}
public Bindings getFailure()
Obtains the Failure (representing no consistent
Bindings) object.
- Returns:
- The failure bindings object.
- Implements:
- getFailure in interface Bindings
public static Bindings getEmpty()
Obtains the Empty (representing no current
Bindings) object.
- Returns:
- The empty bindings object.
public boolean isEmpty()
Determine if this
Bindingsobject represents the Empty (no current bindings) object.
- Returns:
- true iff this object is the Empty bindings object.
- Implements:
- isEmpty in interface Bindings
public boolean isFailure()
Determine if this
Bindingsobject represents the Failure (no consistent bindings) object.
- Returns:
- true iff this object is the Failure bindings object.
- Implements:
- isFailure in interface Bindings
public boolean isBound(Variable var)
Determine if the given
Variableis currently bound.
Parameter Description var The variable to check.
- Returns:
- true iff the
Variableis bound.- Implements:
- isBound in interface Bindings
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
public Bindings extendBindings(Variable var,
Object val)
Extends this
Bindingsobject with an association between the givenVariableand value.Note: This method does not change the contents of the
ListBindingsobject 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 Variableis to be bound.
- Returns:
- An extended
ListBindingsobject.- Implements:
- extendBindings in interface Bindings
public String toString()
Returns a
Stringrepresentation of this object.
- Returns:
- a
Stringrepresentation of this object.- Overrides:
- toString in class Object
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 IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4