- All Known Implementing Classes:
Binding0,Binding1,Binding2,Binding3,Binding4,BindingBase,BindingOverMap,BindingProject,BindingProjectBase,BindingProjectNamed,BindingRoot
public interface Binding
Interface encapsulating a mapping from a name to a value.
A Binding is a map from Var to Node.
It can have a parent, meaning this binding extends (adds new var/node pairs) another.
The operation get(java.lang.String) looks in this binding, then looks in the parent recursively.
Bindings are immutable.
Bindings provide value-based equality and hash code.
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic BindingBuilderbuilder()Create aBindingBuilderstatic BindingBuilderCreate aBindingBuilderdefault booleanTest whether a variable is bound to some objectbooleanTest whether a variable is bound to some objectdetach()Returns a binding which is guaranteed to be independent of any resources such as an ongoing query execution or a disk-based dataset.booleanvoidforEach(BiConsumer<Var, org.apache.jena.graph.Node> action) Operate on each entry.default org.apache.jena.graph.NodeReturn the object bound to a variable, or nullorg.apache.jena.graph.NodeReturn the object bound to a variable, or nullinthashCode()booleanisEmpty()Is this an empty binding?intsize()Number of (var, value) pairs.vars()Iterate over all variables of this binding.Collect all variables of this binding.
-
Field Details
-
noParent
-
-
Method Details
-
builder
Create aBindingBuilder -
builder
Create aBindingBuilder -
vars
Iterate over all variables of this binding. -
varsMentioned
Collect all variables of this binding. -
forEach
Operate on each entry. -
contains
Test whether a variable is bound to some object -
get
Return the object bound to a variable, or null -
contains
Test whether a variable is bound to some object -
get
Return the object bound to a variable, or null -
size
int size()Number of (var, value) pairs. -
isEmpty
boolean isEmpty()Is this an empty binding? No variables. -
hashCode
int hashCode() -
equals
-
detach
Binding detach()Returns a binding which is guaranteed to be independent of any resources such as an ongoing query execution or a disk-based dataset. May return itself if it is already detached.
-