public class ContextBindingSet extends Object implements IBindingSet
IBindingSet to provide access to the BOpContext. The
BOpContext information is transient and will not cross the
wire.| Constructor and Description |
|---|
ContextBindingSet(BOpContextBase context,
IBindingSet delegate) |
| 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.
|
BOpContextBase |
getBOpContext() |
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.
|
String |
toString() |
Iterator<IVariable> |
vars()
Visits the bound variables.
|
public ContextBindingSet(BOpContextBase context, IBindingSet delegate)
public BOpContextBase getBOpContext()
public boolean isBound(IVariable var)
IBindingSettrue iff the variable is bound.isBound in interface IBindingSetvar - The variable.true if the variable is bound.public void set(IVariable var, IConstant val)
IBindingSetset in interface IBindingSetvar - The variable.val - The value (MAY NOT be null).public IConstant get(IVariable var)
IBindingSetget in interface IBindingSetvar - The variable.null iff the
variable is not bound.public void clear(IVariable var)
IBindingSetclear in interface IBindingSetvar - The variable.public void clearAll()
IBindingSetclearAll in interface IBindingSetpublic boolean isEmpty()
IBindingSettrue iff there are no variable bindings in the binding set.isEmpty in interface IBindingSetpublic int size()
IBindingSetsize in interface IBindingSetpublic Iterator<Map.Entry<IVariable,IConstant>> iterator()
IBindingSetiterator in interface IBindingSetpublic Iterator<IVariable> vars()
IBindingSetvars in interface IBindingSetpublic IBindingSet clone()
IBindingSetclone in interface IBindingSetclone in class Objectpublic IBindingSet copy(IVariable[] variablesToKeep)
IBindingSetcopy in interface IBindingSetvariablesToKeep - When non-null, only the listed variables are
retained.public IBindingSet copyMinusErrors(IVariable[] variablesToKeep)
IBindingSetcopyMinusErrors in interface IBindingSetvariablesToKeep - When non-null, only the listed variables are
retained.public final boolean containsErrorValues()
containsErrorValues in interface IBindingSetpublic boolean equals(Object o)
IBindingSetequals in interface IBindingSetequals in class Objecto - Another binding set.public int hashCode()
IBindingSetIConstants 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 interface IBindingSethashCode in class ObjectCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.