|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.bop.ContextBindingSet
public class ContextBindingSet
Wraps an IBindingSet to provide access to the BOpContext. The
BOpContext information is transient and will not cross the
wire.
| Constructor Summary | |
|---|---|
ContextBindingSet(BOpContext<?> context,
IBindingSet delegate)
|
|
| 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. |
BOpContext |
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. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ContextBindingSet(BOpContext<?> context,
IBindingSet delegate)
| Method Detail |
|---|
public BOpContext 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)
IBindingSet
set in interface IBindingSetvar - The variable.val - The value (MAY NOT be null).public IConstant get(IVariable var)
IBindingSet
get in interface IBindingSetvar - The variable.
null iff the
variable is not bound.public void clear(IVariable var)
IBindingSet
clear in interface IBindingSetvar - The variable.public void clearAll()
IBindingSet
clearAll in interface IBindingSetpublic boolean isEmpty()
IBindingSettrue iff there are no variable bindings in the binding set.
isEmpty in interface IBindingSetpublic int size()
IBindingSet
size in interface IBindingSetpublic Iterator<Map.Entry<IVariable,IConstant>> iterator()
IBindingSet
iterator in interface IBindingSetpublic Iterator<IVariable> vars()
IBindingSet
vars in interface IBindingSetpublic IBindingSet clone()
IBindingSet
clone in interface IBindingSetclone in class Objectpublic IBindingSet copy(IVariable[] variablesToKeep)
IBindingSet
copy in interface IBindingSetvariablesToKeep - When non-null, only the listed variables are
retained.public boolean equals(Object o)
IBindingSet
equals 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 Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||