Interface BuildableFunction<T,R>

All Superinterfaces:
Function<T,R>
All Known Subinterfaces:
BuildableBytesFunction<T>, BuildableComparableFunction<T,R>, BuildableComparableSelectionFunction<SRC,T,P>, BuildableComplexDataFunction<T,C>, BuildableListFunction<T>, BuildableMapFunction<T>, BuildableNumberSelectionFunction<SRC,T,P>, BuildableSelectionFunction<SRC,T,P>, BuildableStringFunction<T>, BuildableTypedValueSelectionFunction<SRC>

public interface BuildableFunction<T,R> extends Function<T,R>
A function of one argument that supports building derived functional types.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> Function<T,T>
    Returns a function that simply returns its argument.
    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.

      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.
      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.
      Parameters:
      collection - to test against
      Returns:
      a "contained in" predicate
    • identity

      static <T> Function<T,T> identity()
      Returns a function that simply returns its argument.
      Type Parameters:
      T - the type of the input and resul
      Returns:
      a function returning its argument