Package org.jppf.net
Class AbstractIPAddressPattern
java.lang.Object
org.jppf.net.RangePattern
org.jppf.net.AbstractIPAddressPattern
- Direct Known Subclasses:
IPv4AddressPattern,IPv6AddressPattern
Represents a pattern used for IP addresses inclusion or exclusion lists.
A pattern represents a single value or a range of values for each component of an IP address.
A pattern represents a single value or a range of values for each component of an IP address.
- Author:
- Laurent Cohen
-
Field Summary
Fields inherited from class org.jppf.net.RangePattern
config, ranges -
Constructor Summary
ConstructorsConstructorDescriptionAbstractIPAddressPattern(String source, PatternConfiguration config) Initialize this object with the specified string pattern. -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches(InetAddress ip) Determine whether the specified IP address matches this pattern.Methods inherited from class org.jppf.net.RangePattern
convertSource, matches, postProcess, preProcess, toString
-
Constructor Details
-
AbstractIPAddressPattern
public AbstractIPAddressPattern(String source, PatternConfiguration config) throws IllegalArgumentException Initialize this object with the specified string pattern.- Parameters:
source- the source pattern as a string.config- the configuration used for this pattern.- Throws:
IllegalArgumentException- if the pattern is null or invalid.
-
-
Method Details
-
matches
Determine whether the specified IP address matches this pattern. No check is made to verify that the IP address is valid.- Parameters:
ip- the ip to match as a string.- Returns:
- true if the address matches this pattern, false otherwise.
-