Package com.stardog.stark.query

# Interface Binding

All Superinterfaces:
  `Supplier<Value>`

public interface Binding extends Supplier<Value>

A variable binding in a single `solution` to a `select query`.

Since:
  1.0
Version:
  1.0
Author:
  Michael Grove

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default Optional<BNode>`
  `bnode()`
  Return the value of the binding, optionally, as a bnode
  `default Value`
  `get()`
  `default Optional<IRI>`
  `iri()`
  Return the value of the binding, optionally, as a IRI
  `default Optional<Literal>`
  `literal()`
  Return the value of the binding, optionally, as a literal
  `String`
  `name()`
  Return the name of the variable the value is bound to
  `default Optional<Resource>`
  `resource()`
  Return the value of the binding, optionally, as a resource (bnode or iri)
  `default Optional<Statement>`
  `statement()`
  Return the value of the binding, optionally, as a statement
  `Value`
  `value()`
  Return the value of the binding

- ## Method Details

  - ### name

    @Nonnull String name()
    Return the name of the variable the value is bound to
    Returns:
      the variable name

  - ### value

    @Nonnull Value value()
    Return the value of the binding
    Returns:
      the value

  - ### literal

    default Optional<Literal> literal()
    Return the value of the binding, optionally, as a literal
    Returns:
      the value as a literal, or an empty optional if the value is not a literal

  - ### resource

    default Optional<Resource> resource()
    Return the value of the binding, optionally, as a resource (bnode or iri)
    Returns:
      the value as a resource, or an empty optional if the value is not a resource

  - ### iri

    default Optional<IRI> iri()
    Return the value of the binding, optionally, as a IRI
    Returns:
      the value as a IRI, or an empty optional if the value is not a IRI

  - ### bnode

    default Optional<BNode> bnode()
    Return the value of the binding, optionally, as a bnode
    Returns:
      the value as a bnode, or an empty optional if the value is not a bnode

  - ### statement

    default Optional<Statement> statement()
    Return the value of the binding, optionally, as a statement
    Returns:
      the value as a statement, or an empty optional if the value is not a statement

  - ### get

    default Value get()
    Specified by:
      `get` in interface `Supplier<Value>`