Interface InetAddressValidator
- All Superinterfaces:
ObjectComponent<InetAddressValidator, InetAddress>, ValidatorComponent<InetAddressValidator, InetAddress>
public interface InetAddressValidator
extends ValidatorComponent<InetAddressValidator, InetAddress>, ObjectComponent<InetAddressValidator, InetAddress>
Validates the state of an
InetAddress.-
Method Summary
Methods declared in interface ObjectComponent
getValue, isEqualTo, isEqualTo, isInstanceOf, isInstanceOf, isNotEqualTo, isNotEqualTo, isNotInstanceOf, isNotInstanceOf, isNotNull, isNull, isReferenceEqualTo, isReferenceNotEqualToMethods declared in interface ValidatorComponent
and, elseGetFailures, elseThrow, getContext, getContextAsString, getName, getValueOrDefault, validationFailed, withContext
-
Method Details
-
isIpV4
InetAddressValidator isIpV4()Ensures that the value is an IP v4 address.- Returns:
- this
- Throws:
NullPointerException- if the value is nullIllegalArgumentException- if the value is not an IP v4 address
-
isIpV6
InetAddressValidator isIpV6()Ensures that the actual value is an IP v6 address.- Returns:
- this
- Throws:
NullPointerException- if the value is nullIllegalArgumentException- if the value is not an IP v6 address
-