Interface Binding

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 Details

    • noParent

      static final Binding noParent
  • Method Details

    • builder

      static BindingBuilder builder()
    • builder

      static BindingBuilder builder(Binding parent)
    • vars

      Iterator<Var> vars()
      Iterate over all variables of this binding.
    • varsMentioned

      Set<Var> varsMentioned()
      Collect all variables of this binding.
    • forEach

      void forEach(BiConsumer<Var,org.apache.jena.graph.Node> action)
      Operate on each entry.
    • contains

      boolean contains(Var var)
      Test whether a variable is bound to some object
    • get

      default org.apache.jena.graph.Node get(String varName)
      Return the object bound to a variable, or null
    • contains

      default boolean contains(String varName)
      Test whether a variable is bound to some object
    • get

      org.apache.jena.graph.Node get(Var var)
      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()
      Overrides:
      hashCode in class Object
    • equals

      boolean equals(Object other)
      Overrides:
      equals in class Object