Enum Class NumericConstraint
- All Implemented Interfaces:
Serializable
,Comparable<NumericConstraint>
,Constable
,Constraint<Number>
List of default constraint for ParameterTypes.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionChecks for ≥1.Checks for <0.Checks for ≤0.Checks for ≠0.Checks for >0.Checks for ≥0. -
Method Summary
Modifier and TypeMethodDescriptionReturns a message for value failure, pointing to a parameter using '%s'.static NumericConstraint
Returns the enum constant of this class with the specified name.static NumericConstraint[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface org.opentrafficsim.base.parameters.constraint.Constraint
accept
-
Enum Constant Details
-
POSITIVE
Checks for >0. -
NEGATIVE
Checks for <0. -
POSITIVEZERO
Checks for ≥0. -
NEGATIVEZERO
Checks for ≤0. -
NONZERO
Checks for ≠0. -
ATLEASTONE
Checks for ≥1.
-
-
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
-
failMessage
Returns a message for value failure, pointing to a parameter using '%s'.- Specified by:
failMessage
in interfaceConstraint<Number>
- Returns:
- Message for value failure, pointing to a parameter using '%s'.
-