| org.openrdf.query.BindingSet
All known Subclasses: org.openrdf.query.impl.EmptyBindingSet, org.openrdf.query.algebra.evaluation.QueryBindingSet, org.openrdf.query.impl.MapBindingSet, org.openrdf.query.impl.ListBindingSet,
BindingSet | public interface BindingSet extends Iterable<Binding>(Code) | | A BindingSet is a set of named value bindings, which is used a.o. to
represent a single query solution. Values are indexed by name of the binding
which typically corresponds to the names of the variables used in the
projection of the orginal query.
|
Method Summary | |
public boolean | equals(Object o) Compares a BindingSet object to another object.
Parameters: o - The object to compare this binding to. | public Binding | getBinding(String bindingName) Gets the binding with the specified name from this BindingSet.
Parameters: bindingName - The name of the binding. | public Set<String> | getBindingNames() Gets the names of the bindings in this BindingSet. | public Value | getValue(String bindingName) Gets the value of the binding with the specified name from this
BindingSet.
Parameters: bindingName - The name of the binding. | public boolean | hasBinding(String bindingName) Checks whether this BindingSet has a binding with the specified name.
Parameters: bindingName - The name of the binding. | public int | hashCode() The hash code of a binding is defined as the bit-wise XOR of the hash
codes of its bindings:
int hashCode = 0;
for (Binding binding : this) {
hashCode ˆ= binding.hashCode();
}
Note: the calculated hash code intentionally does not dependent on the
order in which the bindings are iterated over. | public Iterator<Binding> | iterator() Creates an iterator over the bindings in this BindingSet. | public int | size() Returns the number of bindings in this BindingSet. |
equals | public boolean equals(Object o)(Code) | | Compares a BindingSet object to another object.
Parameters: o - The object to compare this binding to. true if the other object is an instance ofBindingSet and it contains the same set of bindings(disregarding order), false otherwise. |
getBinding | public Binding getBinding(String bindingName)(Code) | | Gets the binding with the specified name from this BindingSet.
Parameters: bindingName - The name of the binding. The binding with the specified name, or null if thereis no such binding in this BindingSet. |
getBindingNames | public Set<String> getBindingNames()(Code) | | Gets the names of the bindings in this BindingSet.
A set of binding names. |
getValue | public Value getValue(String bindingName)(Code) | | Gets the value of the binding with the specified name from this
BindingSet.
Parameters: bindingName - The name of the binding. The value of the binding with the specified name, or nullif there is no such binding in this BindingSet. |
hasBinding | public boolean hasBinding(String bindingName)(Code) | | Checks whether this BindingSet has a binding with the specified name.
Parameters: bindingName - The name of the binding. true if this BindingSet has a binding with thespecified name, false otherwise. |
hashCode | public int hashCode()(Code) | | The hash code of a binding is defined as the bit-wise XOR of the hash
codes of its bindings:
int hashCode = 0;
for (Binding binding : this) {
hashCode ˆ= binding.hashCode();
}
Note: the calculated hash code intentionally does not dependent on the
order in which the bindings are iterated over.
A hash code for the BindingSet. |
iterator | public Iterator<Binding> iterator()(Code) | | Creates an iterator over the bindings in this BindingSet. This only
returns bindings with non-null values. An implementation is free to return
the bindings in arbitrary order.
|
size | public int size()(Code) | | Returns the number of bindings in this BindingSet.
The number of bindings in this BindingSet. |
|
|