Package org.forgerock.opendj.ldap
Class AddressMask
java.lang.Object
org.forgerock.opendj.ldap.AddressMask
An address mask can be used to perform efficient comparisons against IP
addresses to determine whether a particular IP address is in a given range.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches(InetAddress address) Returnstrueif this address mask matches the provided address.static booleanmatchesAny(Collection<AddressMask> masks, InetAddress address) Returnstrueif an address matches any of the provided address masks.toString()static AddressMaskParses the provided string as an address mask.
-
Method Details
-
matchesAny
Returnstrueif an address matches any of the provided address masks.- Parameters:
address- The address.masks- A collection of address masks to check.- Returns:
trueif an address matches any of the provided address masks.
-
valueOf
Parses the provided string as an address mask.- Parameters:
mask- The address mask string to be parsed.- Returns:
- The parsed address mask.
- Throws:
LocalizedIllegalArgumentException- If the provided string cannot be decoded as an address mask.
-
matches
Returnstrueif this address mask matches the provided address.- Parameters:
address- The address.- Returns:
trueif this address mask matches the provided address.
-
toString
-