Interface BuildableOptionalFunction<T,R>

All Superinterfaces:
Function<T,Optional<R>>
All Known Subinterfaces:
BuildableBytesOptionalFunction<T>, BuildableComparableOptionalFunction<T,R>, BuildableComparableSelectionOptionalFunction<SRC,T,P>, BuildableComplexDataOptionalFunction<T,C>, BuildableListOptionalFunction<T>, BuildableMapOptionalFunction<T>, BuildableNumberSelectionOptionalFunction<SRC,T,P>, BuildableNumberSelectionOptionalFunction.BuildableDoubleSelectionOptionalFunction<SRC>, BuildableNumberSelectionOptionalFunction.BuildableIntegerSelectionOptionalFunction<SRC>, BuildableNumberSelectionOptionalFunction.BuildableLongSelectionOptionalFunction<SRC>, BuildableSelectionOptionalFunction<SRC,T,P>, BuildableStringOptionalFunction<T>, BuildableTypedValueSelectionOptionalFunction<SRC>

public interface BuildableOptionalFunction<T,R> extends Function<T,Optional<R>>
A function of one argument that generates an Optional result , and supports building derived functional types.
  • Method Summary

    Modifier and Type
    Method
    Description
    in(Set<? super R> values)
    Returns a predicate that tests the value generated by this is contained within the supplied set.
    in(R... collection)
    Returns a predicate that tests the value generated by this is contained within the supplied collection.
    is(R test)
    Returns a predicate that tests the value generated by this for equality with the supplied constant.

    Methods inherited from interface java.util.function.Function

    andThen, apply, compose
  • Method Details

    • is

      default BuildablePredicate<T> is(R test)
      Returns a predicate that tests the value generated by this for equality with the supplied constant. If this is a function that generates an empty Optional, the returned predicate would always evaluate to false

      Equality is defined by the behavior of the Objects.deepEquals(java.lang.Object, java.lang.Object) method.

      Parameters:
      test - value to test against
      Returns:
      an equality predicate
    • in

      default BuildablePredicate<T> in(Set<? super R> values)
      Returns a predicate that tests the value generated by this is contained within the supplied set. If this is a function that generates an empty Optional, the returned predicate would always evaluate to false.
      Parameters:
      values - to test against
      Returns:
      a "contained in" predicate
    • in

      default BuildablePredicate<T> in(R... collection)
      Returns a predicate that tests the value generated by this is contained within the supplied collection. If this is a function that generates an empty Optional, the returned predicate would always evaluate to false.
      Parameters:
      collection - to test against
      Returns:
      a "contained in" predicate