|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IBindingSet
Interface for a set of bindings. The set of variables values is extensible and the bound values are loosely typed.
| Method Summary | |
|---|---|
void |
clear(IVariable var)
Clear any binding for the variable. |
void |
clearAll()
Clear all bindings. |
IBindingSet |
clone()
Return a shallow copy of the binding set. |
IBindingSet |
copy(IVariable[] variablesToKeep)
Return a shallow copy of the binding set, eliminating unnecessary variables. |
boolean |
equals(Object o)
True iff the variables and their bound values are the same for the two binding sets. |
IConstant |
get(IVariable var)
Return the binding for the variable. |
int |
hashCode()
The hash code of a binding is defined as the bit-wise XOR of the hash codes of the IConstants for its bound variables. |
boolean |
isBound(IVariable var)
Return true iff the variable is bound. |
boolean |
isEmpty()
true iff there are no variable bindings in the binding set. |
Iterator<Map.Entry<IVariable,IConstant>> |
iterator()
Visits the bindings. |
void |
set(IVariable var,
IConstant val)
Bind the variable to the value. |
int |
size()
The #of bound variables. |
Iterator<IVariable> |
vars()
Visits the bound variables. |
| Method Detail |
|---|
boolean isBound(IVariable var)
true iff the variable is bound.
var - The variable.
true if the variable is bound.
IllegalArgumentException - if var is null.
void set(IVariable var,
IConstant val)
var - The variable.val - The value (MAY NOT be null).
IllegalArgumentException - if var is null.
IllegalArgumentException - if val is null.IConstant get(IVariable var)
var - The variable.
null iff the
variable is not bound.
IllegalArgumentException - if var is null.void clear(IVariable var)
var - The variable.
IllegalArgumentException - if var is null.void clearAll()
boolean isEmpty()
true iff there are no variable bindings in the binding set.
int size()
Iterator<Map.Entry<IVariable,IConstant>> iterator()
Iterator<IVariable> vars()
IBindingSet clone()
IBindingSet copy(IVariable[] variablesToKeep)
variablesToKeep - When non-null, only the listed variables are
retained.boolean equals(Object o)
equals in class Objecto - Another binding set.int hashCode()
IConstants for its bound variables. Unbound
variables are ignored when computing the hash code. Binding sets are
unordered collections, therefore the calculated hash code intentionally
does not depend on the order in which the bindings are visited. The hash
code reflects the current state of the bindings and must be recomputed if
the bindings are changed.
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||