Package org.apache.calcite.util
Class Holder<E>
java.lang.Object
org.apache.calcite.util.Holder<E>
- Type Parameters:
E
- Element type
A mutable slot that can contain one object.
A holder is useful for implementing OUT or IN-OUT parameters.
It is possible to sub-class to receive events on get or set.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Holder
Creates a Holder containing a given value.Call this method from a derived constructor or via the
of(E)
method.
-
-
Method Details
-
set
Sets the value. -
get
Gets the value. -
accept
Applies a transform to the value. -
of
Creates a holder containing a given value. -
empty
Creates a holder containing null.
-