Interface NegativeNumberComponent<S>
- Type Parameters:
S
- the type of this validator
- All Known Subinterfaces:
BigDecimalValidator
,BigIntegerValidator
,ByteValidator
,DoubleValidator
,FloatValidator
,IntegerValidator
,LongValidator
,PrimitiveByteValidator
,PrimitiveDoubleValidator
,PrimitiveFloatValidator
,PrimitiveIntegerValidator
,PrimitiveLongValidator
,PrimitiveShortValidator
,ShortValidator
public interface NegativeNumberComponent<S>
Methods that validators for numbers that may be negative must contain.
-
Method Summary
Modifier and TypeMethodDescriptionEnsures that the value is a negative number.Ensures that the value is not a negative number.
-
Method Details
-
isNegative
S isNegative()Ensures that the value is a negative number.-0.0
is considered to be zero *and* negative.- Returns:
- this
- Throws:
NullPointerException
- if the value isnull
IllegalArgumentException
- if the value is:- not negative
- not a number
-
isNotNegative
S isNotNegative()Ensures that the value is not a negative number.-0.0
is considered to be zero *and* negative.- Returns:
- this
- Throws:
NullPointerException
- if the value isnull
IllegalArgumentException
- if the value is a negative number
-