Interface Ref<X,S extends Selection<X>>

Type Parameters:
X - stream item type
S - criteria type for stream item
All Known Implementing Classes:
ExprRef, FromRef, PathRef, RootRef

public interface Ref<X,S extends Selection<X>>
A reference to items in a QueryStream.

Refs are created and then bound to the items in a QueryStream via QueryStream.bind(). Once bound, they may be accessed in a subsequent filter predicate, subquery QueryStream, etc., via get().

  • Method Summary

    Modifier and Type
    Method
    Description
    bind(S value)
    Bind the given value to this reference.
    get()
    Get the bound value.
    boolean
    Determine if this instance is bound.
    void
    Unbind the bound value, if any.
  • Method Details

    • bind

      S bind(S value)
      Bind the given value to this reference.
      Parameters:
      value - value to bind
      Returns:
      same value
      Throws:
      IllegalStateException - if another value is already bound
      IllegalArgumentException - if value is null
    • get

      S get()
      Get the bound value.
      Returns:
      bound value
      Throws:
      IllegalStateException - if this instance is not bound
    • unbind

      void unbind()
      Unbind the bound value, if any.
    • isBound

      boolean isBound()
      Determine if this instance is bound.
      Returns:
      true if this instance is bound, otherwise false