Skip to the content.

6. Predicates

This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

Represents a predicate (boolean-valued function) of one argument.

6.1 Logical

isTrue()
isTrue(final Function<T, Boolean> function)
isFalse()
isFalse(final Function<T, Boolean> function)
not(final predicate)

6.2 Object

equalObject(final Function<T, Object> source, final Function<T, Object> target)
equalObject(final Function<T, Object> source, final Object target)
equalObject(final T obj)
instanceOf(final Class<?> clazz)
instanceOf(final Function<T, ?> source, final Class<?> clazz)
nullValue()
nullValue(final Function<T, ?> source)

6.3 String

isAlpha()
isAlpha(final Function<T, String> source)
isAlphaNumeric()
isAlphaNumeric(final Function<T, String> source)
isDate(final Function<T, String> source, final String pattern)
isDate(final String pattern)
isDateTime(final Function<T, String> source, final String pattern)
isDateTime(final String pattern)
isTime(final Function<T, String> source, final String pattern)
isTime(final String pattern)
isNumber()
isNumber(final Function<T, String> source)
isNumeric()
isNumeric(final Function<T, String> source)
stringContains(final Function<T, String> source, final String str)
stringContains(final String str)
stringEmptyOrNull()
stringEmptyOrNull(final Function<T, String> source)
stringEquals(final Function<T, String> source, final Function<T, String> target)
stringEquals(final Function<T, String> source, final String value)
stringEquals(final String value)
stringEqualsIgnoreCase(final Function<T, String> source, final Function<T, String> target)
stringEqualsIgnoreCase(final Function<T, String> source, final String value)
stringEqualsIgnoreCase(final String value)
stringMatches(final Function<T, String> source, final String regex)
stringMatches(final String regex)
stringSize(final Function<T, String> source, final Function<T, String> target)
stringSize(final Function<T, String> source, final Integer size)
stringSize(final Integer size)
stringSizeBetween(final Function<T, String> source, final Integer minSize, final Integer maxSize)
stringSizeBetween(final Integer minSize, final Integer maxSize)
stringSizeGreaterThan(final Function<T, String> source, final Function<T, String> target)
stringSizeGreaterThan(final Function<T, String> source, final Integer size)
stringSizeGreaterThan(final Integer size)
stringSizeGreaterThanOrEqual(final Function<T, String> source, final Function<T, String> target)
stringSizeGreaterThanOrEqual(final Function<T, String> source, final Integer size)
stringSizeGreaterThanOrEqual(final Integer size)
stringSizeLessThan(final Function<T, String> source, final Function<T, String> target)
stringSizeLessThan(final Function<T, String> source, final Integer size)
stringSizeLessThan(final Integer size)
stringSizeLessThanOrEqual(final Function<T, String> source, final Function<T, String> target)
stringSizeLessThanOrEqual(final Function<T, String> source, final Integer size)
stringSizeLessThanOrEqual(final Integer size)
stringInCollection(final Collection<String> collection)
stringInCollection(final Function<T, String> source, final Collection<String> collection)
stringInCollection(final String source, final Function<T, Collection<String>> target)
stringInCollection(final Function<T, String> source, final Function<T, Collection<String>> target)

6.4 Comparable

between(final E min, final E max)
between(final E min, final Function<T, E> max)
between(final Function<T, E> min, final E max)
between(final Function<T, E> min, final Function<T, E> max)
between(final Function<T, E> source, final E min, final E max)
between(final Function<T, E> source, final E min, final Function<T, E> max)
between(final Function<T, E> source, final Function<T, E> min, final E max)
between(final Function<T, E> source, final Function<T, E> min, final Function<T, E> max)
betweenInclusive(final E min, final E max)
betweenInclusive(final E min, final Function<T, E>  max)
betweenInclusive(final Function<T, E>  min, final E max)
betweenInclusive(final Function<T, E>  min, final Function<T, E> max)
betweenInclusive(final Function<T, E> source, final E min, final E max)
betweenInclusive(final Function<T, E> source, final E min, final Function<T, E> max)
betweenInclusive(final Function<T, E> source, final Function<T, E> min, final E max)
betweenInclusive(final Function<T, E> source, final Function<T, E> min, final Function<T, E> max)
equalTo(final E value)
equalTo(final Function<T, E> source, final E value)
equalTo(final Function<T, E> source, final Function<T, E> target)
greaterThan(final E min)
greaterThan(final Function<T, E> source, final E min)
greaterThan(final Function<T, E> source, final Function<T, E> target)
greaterThanOrEqual(final E min)
greaterThanOrEqual(final Function<T, E> source, final E min)
greaterThanOrEqual(final Function<T, E> source, final Function<T, E> target)
lessThan(final E max)
lessThan(final Function<T, E> source, final E max)
lessThan(final Function<T, E> source, final Function<T, E> target)
lessThanOrEqual(final E max)
lessThanOrEqual(final Function<T, E> source, final E max)
lessThanOrEqual(final Function<T, E> source, final Function<T, E> target)

6.5 Collection

empty()
empty(final Function<T, Collection<E>> source)
hasAny(final Collection<E> objects)
hasAny(final E[] objects)
hasAny(final Function<T, Collection<E>> source, final Collection<E> objects)
hasAny(final Function<T, Collection<E>> source, final E[] objects)
hasItem(final E object)
hasItem(final Function<T, Collection<E>> source, final E object)
hasItems(final Collection<E> objects)
hasItems(final E[] objects)
hasItems(final Function<T, Collection<E>> source, final Collection<E> objects)
hasItems(final Function<T, Collection<E>> source, final E[] objects)
hasSizeBetween(final Function<T, Collection<E>> source, final Integer min, final Integer max)
hasSizeBetween(final Integer min, final Integer max)
hasSizeBetweenInclusive(final Function<T, Collection<E>> source, final Integer min, final Integer max)
hasSizeBetweenInclusive(final Integer min, final Integer max)
hasSize(final Function<T, Collection<E>> source, final Function<T, Integer> size)
hasSize(final Function<T, Collection<E>> source, final Integer size)
hasSize(final Integer size)

6.6 Map

mapGet(final K key, final Predicate<V> predicate)
mapGet(final Function<T, K> key, final Predicate<V> predicate)
containsKey(final K key)
containsKey(final Function<T, K> key)
containsValue(final V value)
containsValue(final Function<T, V> value)

6.7 Date

dateBetween(final Function<T, String> source, final String dateStringMin, final String dateStringMax, final String pattern)
dateBetween(final String dateStringMin, final String dateStringMax, final String pattern)
dateEqualTo(final Function<T, String> source, final Function<T, String> target, final String pattern)
dateEqualTo(final Function<T, String> source, final String target, final String pattern)
dateEqualTo(final String dateString, final String pattern)
dateGreaterThan(final Function<T, String> source, final Function<T, String> target, final String pattern)
dateGreaterThan(final Function<T, String> source, final String target, final String pattern)
dateGreaterThan(final String dateString, final String pattern)
dateGreaterThanOrEqual(final Function<T, String> source, final Function<T, String> target, final String pattern)
dateGreaterThanOrEqual(final Function<T, String> source, final String target, final String pattern)
dateGreaterThanOrEqual(final String dateString, final String pattern)
dateLessThan(final Function<T, String> source, final Function<T, String> target, final String pattern)
dateLessThan(final Function<T, String> source, final String target, final String pattern)
dateLessThan(final String dateString, final String pattern)
dateLessThanOrEqual(final Function<T, String> source, final Function<T, String> target, final String pattern)
dateLessThanOrEqual(final Function<T, String> source, final String target, final String pattern)
dateLessThanOrEqual(final String dateString, final String pattern)

6.8 DateTime

dateTimeBetween(final Function<T, String> source, final String dateStringMin, final String dateStringMax, final String pattern)
dateTimeBetween(final String dateStringMin, final String dateStringMax, final String pattern)
dateTimeEqualTo(final Function<T, String> source, final Function<T, String> target, final String pattern)
dateTimeEqualTo(final Function<T, String> source, final String target, final String pattern)
dateTimeEqualTo(final String dateString, final String pattern)
dateTimeGreaterThan(final Function<T, String> source, final Function<T, String> target, final String pattern)
dateTimeGreaterThan(final Function<T, String> source, final String target, final String pattern)
dateTimeGreaterThan(final String dateString, final String pattern)
dateTimeGreaterThanOrEqual(final Function<T, String> source, final Function<T, String> target, final String pattern)
dateTimeGreaterThanOrEqual(final Function<T, String> source, final String target, final String pattern)
dateTimeGreaterThanOrEqual(final String dateString, final String pattern)
dateTimeLessThan(final Function<T, String> source, final Function<T, String> target, final String pattern)
dateTimeLessThan(final Function<T, String> source, final String target, final String pattern)
dateTimeLessThan(final String dateString, final String pattern)
dateTimeLessThanOrEqual(final Function<T, String> source, final Function<T, String> target, final String pattern)
dateTimeLessThanOrEqual(final Function<T, String> source, final String target, final String pattern)
dateTimeLessThanOrEqual(final String dateString, final String pattern)

6.9 Time

timeEqualTo(final Function<T, String> source, final Function<T, String> target, final String pattern)
timeGreaterThan(final Function<T, String> source, final Function<T, String> target, final String pattern)
timeLessThan(final Function<T, String> source, final Function<T, String> target, final String pattern)
timeGreaterThanOrEqual(final Function<T, String> source, final Function<T, String> target, final String pattern)
timeLessThanOrEqual(final Function<T, String> source, final Function<T, String> target, final String pattern)
timeEqualTo(final Function<T, String> source, final String target, final String pattern)
timeGreaterThan(final Function<T, String> source, final String target, final String pattern)
timeLessThan(final Function<T, String> source, final String target, final String pattern)
timeGreaterThanOrEqual(final Function<T, String> source, final String target, final String pattern)
timeLessThanOrEqual(final Function<T, String> source, final String target, final String pattern)
timeBetween(final Function<T, String> source, final String timeStringMin, final String timeStringMax, final String pattern)
timeEqualTo(final String timeString, final String pattern)
timeGreaterThan(final String timeString, final String pattern)
timeLessThan(final String timeString, final String pattern)
timeGreaterThanOrEqual(final String timeString, final String pattern)
timeLessThanOrEqual(final String timeString, final String pattern)
timeBetween(final String timeStringMin, final String timeStringMax, final String pattern)

6.10 LocalDate

localDateAfterToday()
localDateAfterToday(final Function<T, LocalDate> source)
localDateAfterOrEqualToday()
localDateAfterOrEqualToday(final Function<T, LocalDate> source)
localDateBeforeToday()
localDateBeforeToday(final Function<T, LocalDate> source)
localDateBeforeOrEqualToday()
localDateBeforeOrEqualToday(final Function<T, LocalDate> source)
localDateIsToday()
localDateIsToday(final Function<T, LocalDate> source)
localDateEqualTo(final LocalDate localDate)
localDateEqualTo(final Function<T, LocalDate> source, final LocalDate localDate)
localDateAfter(final LocalDate target)
localDateAfter(final Function<T, LocalDate> source, final LocalDate target)
localDateAfter(final Function<T, LocalDate> source, final Function<T, LocalDate> target)
localDateAfterOrEqual(final LocalDate target)
localDateAfterOrEqual(final Function<T, LocalDate> source, final LocalDate target)
localDateAfterOrEqual(final Function<T, LocalDate> source, final Function<T, LocalDate> target)
localDateBefore(final LocalDate target)
localDateBefore(final Function<T, LocalDate> source, final LocalDate target)
localDateBefore(final Function<T, LocalDate> source, final Function<T, LocalDate> target)
localDateBeforeOrEqual(final LocalDate target)
localDateBeforeOrEqual(final Function<T, LocalDate> source, final LocalDate target)
localDateBeforeOrEqual(final Function<T, LocalDate> source, final Function<T, LocalDate> target)
localDateBetween(final LocalDate min, final LocalDate max)
localDateBetween(final Function<T, LocalDate> source, final LocalDate min, final LocalDate max)
localDateBetween(final Function<T, LocalDate> source, final Function<T, LocalDate> min, final LocalDate max)
localDateBetween(final Function<T, LocalDate> source, final LocalDate min, final Function<T, LocalDate> max)
localDateBetween(final Function<T, LocalDate> source, final Function<T, LocalDate> min, final Function<T, LocalDate> max)
localDateBetweenOrEqual(final LocalDate min, final LocalDate max)
localDateBetweenOrEqual(final Function<T, LocalDate> source, final LocalDate min, final LocalDate max)
localDateBetweenOrEqual(final Function<T, LocalDate> source, final Function<T, LocalDate> min, final LocalDate max)
localDateBetweenOrEqual(final Function<T, LocalDate> source, final LocalDate min, final Function<T, LocalDate> max)
localDateBetweenOrEqual(final Function<T, LocalDate> source, final Function<T, LocalDate> min, final Function<T, LocalDate> max)

6.11 LocalDateTime

localDateTimeAfterToday()
localDateTimeAfterToday(final Function<T, LocalDateTime> source)
localDateTimeAfterOrEqualToday()
localDateTimeAfterOrEqualToday(final Function<T, LocalDateTime> source)
localDateTimeBeforeToday()
localDateTimeBeforeToday(final Function<T, LocalDateTime> source)
localDateTimeBeforeOrEqualToday()
localDateTimeBeforeOrEqualToday(final Function<T, LocalDateTime> source)
localDateTimeIsToday()
localDateTimeIsToday(final Function<T, LocalDateTime> source)
localDateTimeAfterNow()
localDateTimeAfterNow(final Function<T, LocalDateTime> source)
localDateTimeBeforeNow()
localDateTimeBeforeNow(final Function<T, LocalDateTime> source)
localDateTimeEqualTo(final LocalDateTime localDateTime)
localDateTimeEqualTo(final Function<T, LocalDateTime> source, final LocalDateTime localDateTime)
localDateTimeAfter(final LocalDateTime target)
localDateTimeAfter(final Function<T, LocalDateTime> source, final LocalDateTime target)
localDateTimeAfter(final Function<T, LocalDateTime> source, final Function<T, LocalDateTime> target)
localDateTimeAfterOrEqual(final LocalDateTime target)
localDateTimeAfterOrEqual(final Function<T, LocalDateTime> source, final LocalDateTime target)
localDateTimeAfterOrEqual(final Function<T, LocalDateTime> source, final Function<T, LocalDateTime> target)
localDateTimeBefore(final LocalDateTime target)
localDateTimeBefore(final Function<T, LocalDateTime> source, final LocalDateTime target)
localDateTimeBefore(final Function<T, LocalDateTime> source, final Function<T, LocalDateTime> target)
localDateTimeBeforeOrEqual(final LocalDateTime target)
localDateTimeBeforeOrEqual(final Function<T, LocalDateTime> source, final LocalDateTime target)
localDateTimeBeforeOrEqual(final Function<T, LocalDateTime> source, final Function<T, LocalDateTime> target)
localDateTimeBetween(final LocalDateTime min, final LocalDateTime max)
localDateTimeBetween(final Function<T, LocalDateTime> source, final LocalDateTime min, final LocalDateTime max)
localDateTimeBetween(final Function<T, LocalDateTime> source, final Function<T, LocalDateTime> min, final LocalDateTime max)
localDateTimeBetween(final Function<T, LocalDateTime> source, final LocalDateTime min, final Function<T, LocalDateTime> max)
localDateTimeBetween(final Function<T, LocalDateTime> source, final Function<T, LocalDateTime> min, final Function<T, LocalDateTime> max)
localDateTimeBetweenOrEqual(final LocalDateTime min, final LocalDateTime max)
localDateTimeBetweenOrEqual(final Function<T, LocalDateTime> source, final LocalDateTime min, final LocalDateTime max)
localDateTimeBetweenOrEqual(final Function<T, LocalDateTime> source, final Function<T, LocalDateTime> min, final LocalDateTime max)
localDateTimeBetweenOrEqual(final Function<T, LocalDateTime> source, final LocalDateTime min, final Function<T, LocalDateTime> max)
localDateTimeBetweenOrEqual(final Function<T, LocalDateTime> source, final Function<T, LocalDateTime> min, final Function<T, LocalDateTime> max)

6.12 LocalTime

localTimeAfterNow()
localTimeAfterNow(final Function<T, LocalTime> source)
localTimeBeforeNow()
localTimeBeforeNow(final Function<T, LocalTime> source)
localTimeEqualTo(final LocalTime localTime)
localTimeEqualTo(final Function<T, LocalTime> source, final LocalTime localTime)
localTimeAfter(final LocalTime target)
localTimeAfter(final Function<T, LocalTime> source, final LocalTime target)
localTimeAfter(final Function<T, LocalTime> source, final Function<T, LocalTime> target)
localTimeAfterOrEqual(final LocalTime target)
localTimeAfterOrEqual(final Function<T, LocalTime> source, final LocalTime target)
localTimeAfterOrEqual(final Function<T, LocalTime> source, final Function<T, LocalTime> target)
localTimeBefore(final LocalTime target)
localTimeBefore(final Function<T, LocalTime> source, final LocalTime target)
localTimeBefore(final Function<T, LocalTime> source, final Function<T, LocalTime> target)
localTimeBeforeOrEqual(final LocalTime target)
localTimeBeforeOrEqual(final Function<T, LocalTime> source, final LocalTime target)
localTimeBeforeOrEqual(final Function<T, LocalTime> source, final Function<T, LocalTime> target)
localTimeBetween(final LocalTime min, final LocalTime max)
localTimeBetween(final Function<T, LocalTime> source, final LocalTime min, final LocalTime max)
localTimeBetween(final Function<T, LocalTime> source, final Function<T, LocalTime> min, final LocalTime max)
localTimeBetween(final Function<T, LocalTime> source, final LocalTime min, final Function<T, LocalTime> max)
localTimeBetween(final Function<T, LocalTime> source, final Function<T, LocalTime> min, final Function<T, LocalTime> max)
localTimeBetweenOrEqual(final LocalTime min, final LocalTime max)
localTimeBetweenOrEqual(final Function<T, LocalTime> source, final LocalTime min, final LocalTime max)
localTimeBetweenOrEqual(final Function<T, LocalTime> source, final Function<T, LocalTime> min, final LocalTime max)
localTimeBetweenOrEqual(final Function<T, LocalTime> source, final LocalTime min, final Function<T, LocalTime> max)
localTimeBetweenOrEqual(final Function<T, LocalTime> source, final Function<T, LocalTime> min, final Function<T, LocalTime> max)