Package org.forgerock.openig.el.util
Class InetAddressMask
java.lang.Object
org.forgerock.openig.el.util.InetAddressMask
- All Implemented Interfaces:
Predicate<InetAddress>
Matches IPs (v4 or v6) with a CIDR pattern RFC4632.
-
Method Summary
Modifier and TypeMethodDescriptionstatic InetAddressMask
fromCidrPattern
(String cidrPattern) Build an address mask from a CIDR formatted string.boolean
test
(InetAddress ipAddress) toString()
-
Method Details
-
fromCidrPattern
Build an address mask from a CIDR formatted string.- Parameters:
cidrPattern
- The CIDR pattern (example: "127.0.0.1/12"). Must not be null.- Returns:
- the corresponding InetAddressMask.
-
test
- Specified by:
test
in interfacePredicate<InetAddress>
-
toString
-