File-By-File
SupplierFilter

SupplierFilter

Deprecated: Use SupplierFactory instead!

This utility class provides methods for filtering boolean conditions from Supplier<Boolean> objects. It allows for creating complex logical conditions based on the state of multiple boolean suppliers, useful for scenarios like button presses or sensor states.

Methods

anyTrue(Supplier<Boolean>... suppliers)

Checks if any of the provided boolean suppliers return true.

anyFalse(Supplier<Boolean>... suppliers)

Checks if any of the provided boolean suppliers return false.

allTrue(Supplier<Boolean>... suppliers)

Checks if all of the provided boolean suppliers return true.

allFalse(Supplier<Boolean>... suppliers)

Checks if all of the provided boolean suppliers return false.

trueThenAllTrue(Supplier<Boolean> supplier, Supplier<Boolean>... inhibitors)

Returns true if the first supplier returns true AND all subsequent inhibitors also return true.

trueThenAllFalse(Supplier<Boolean> supplier, Supplier<Boolean>... inhibitors)

Returns true if the first supplier returns true AND all subsequent inhibitors return false.

falseThenAllTrue(Supplier<Boolean> supplier, Supplier<Boolean>... inhibitors)

Returns true if the first supplier returns false AND all subsequent inhibitors return true.

falseThenAllFalse(Supplier<Boolean> supplier, Supplier<Boolean>... inhibitors)

Returns true if the first supplier returns false AND all subsequent inhibitors return false.

trueThenAnyTrue(Supplier<Boolean> supplier, Supplier<Boolean>... inhibitors)

Returns true if the first supplier returns true AND any of the subsequent inhibitors return true.

trueThenAnyFalse(Supplier<Boolean> supplier, Supplier<Boolean>... inhibitors)

Returns true if the first supplier returns true AND any of the subsequent inhibitors return false.

falseThenAnyTrue(Supplier<Boolean> supplier, Supplier<Boolean>... inhibitors)

Returns true if the first supplier returns false AND any of the subsequent inhibitors return true.

falseThenAnyFalse(Supplier<Boolean> supplier, Supplier<Boolean>... inhibitors)

Returns true if the first supplier returns false AND any of the subsequent inhibitors return false.

trueCount(Supplier<Boolean>... suppliers)

Counts how many of the provided boolean suppliers return true.

falseCount(Supplier<Boolean>... suppliers)

Counts how many of the provided boolean suppliers return false.

trueCountGreaterThan(int minimum, Supplier<Boolean>... suppliers)

Checks if the number of true suppliers is greater than the specified minimum.

trueCountLessThan(int maximum, Supplier<Boolean>... suppliers)

Checks if the number of true suppliers is less than the specified maximum.

falseCountGreaterThan(int minimum, Supplier<Boolean>... suppliers)

Checks if the number of false suppliers is greater than the specified minimum.

falseCountLessThan(int maximum, Supplier<Boolean>... suppliers)

Checks if the number of false suppliers is less than the specified maximum.

invertSupplier(Supplier<Boolean> supplier)

Returns a new Supplier<Boolean> that returns the inverted boolean value of the original supplier.