public interface IBindingSet extends Cloneable, Serializable
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
containsErrorValues() |
IBindingSet |
copy(IVariable[] variablesToKeep)
Return a shallow copy of the binding set, eliminating unnecessary
variables.
|
IBindingSet |
copyMinusErrors(IVariable[] variablesToKeep)
Return a shallow copy of the binding set, eliminating unnecessary
variables and error values (equal to Constant.errorValueConstant()).
|
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
IConstant s 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.
|
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()
IBindingSet clone()
IBindingSet copy(IVariable[] variablesToKeep)
variablesToKeep
- When non-null
, only the listed variables are
retained.IBindingSet copyMinusErrors(IVariable[] variablesToKeep)
variablesToKeep
- When non-null
, only the listed variables are
retained.boolean containsErrorValues()
boolean equals(Object o)
int hashCode()
IConstant
s 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.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.