Interface BuildableStringOptionalFunction<T>

All Superinterfaces:
BuildableComparableOptionalFunction<T,String>, BuildableOptionalFunction<T,String>, ComparableFunction<T,String>, Function<T,Optional<String>>

public interface BuildableStringOptionalFunction<T> extends BuildableComparableOptionalFunction<T,String>
A function of one argument that generates an Optional<String> result, and supports building derived functional types.
  • Method Details

    • length

      Returns a function that maps the length of the extracted strings.
      Returns:
      a string length function
    • startsWith

      default BuildablePredicate<T> startsWith(String prefix)
      Returns a predicate that tests the strings generated by this to see if they start with the supplied constant string. If this is a function that generates an empty Optional, the returned predicate would always evaluate to false
      Parameters:
      prefix - constant prefix string
      Returns:
      a prefix predicate