- All Implemented Interfaces:
Serializable
,Comparable<Quantifier>
,Constable
Symbolic constants for logical quantifiers.
ComposablePredicate
and
ComposableIntPredicate
let you use logical quantifiers to define not just
a relation between one value and another value, but also
between one value and an array of other values:
Check.that(list).is(notNull().and(contains(), noneOf(), "to", "be", "or", "not"));
(Strictly speaking the value domain of a logical quantifier would better be
modeled as a Set
. For convenience sake, however, it is
modeled as a varargs array within Klojang Check.)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Quantifier
allOf()
ReturnsALL
.static Quantifier
anyOf()
ReturnsANY
.static Quantifier
noneOf()
ReturnsNONE
.static Quantifier
Returns the enum constant of this class with the specified name.static Quantifier[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALL
Symbolic constant for the universal quantifier (∀). -
ANY
Symbolic constant for the existential quantifier (∃). -
NONE
Symbolic constant for the negation of the existential quantifier (¬∃).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
allOf
ReturnsALL
.- Returns:
Quantifier.ALL
-
anyOf
ReturnsANY
.- Returns:
Quantifier.ANY
-
noneOf
ReturnsNONE
.- Returns:
Quantifier.NONE
-