Class FluentFnBase<T,P>

java.lang.Object
org.aksw.jena_sparql_api.core.FluentBase<Function<T,T>,P>
org.aksw.jena_sparql_api.core.FluentFnBase<T,P>
Type Parameters:
T -
P -
All Implemented Interfaces:
ParentSuppliable<P>
Direct Known Subclasses:
FluentQueryExecutionFactoryFn, FluentSparqlServiceFactoryFn, FluentSparqlServiceFn, FluentUpdateExecutionFactoryFn

public abstract class FluentFnBase<T,P> extends FluentBase<Function<T,T>,P>
Abstract class upon Fluent APIs for functions can be built. Provides .compose() and default behavior for .create() and .end() (i.e. returns an identity function if fn is null)
Author:
raven
  • Field Details

    • defaultReverseChaining

      protected boolean defaultReverseChaining
      Controls chaining order when composing functions. As a rule of thumb: If the fluent successively wraps an object, reverse the chain direction, so that first fluent call corresponds to the last wrapper on which methods are invoked first. If a fluent keeps replacing an object with a new one (i.e. no wrapping), chaining can be done in order, so that the last fluent call corresponds to the last replacement
  • Constructor Details

    • FluentFnBase

      public FluentFnBase(boolean reverseChaining)
    • FluentFnBase

      public FluentFnBase(Function<T,T> fn, boolean defaultReverseChaining)
  • Method Details

    • compose

      public FluentFnBase<T,P> compose(Function<T,T> nextFn)
    • value

      public Function<T,T> value()
      Description copied from class: FluentBase
      Create the result value. This method should *never* be used directly by client code - instead, use create(). However, it may be useful for debugging.
      Overrides:
      value in class FluentBase<Function<T,T>,P>
      Returns: