Package org.opennms.core.utils
Class IPLike
- java.lang.Object
-
- org.opennms.core.utils.IPLike
-
public abstract class IPLike extends Object
IPLike class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Constructor Summary
Constructors Constructor Description IPLike()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcountChar(char charIn, String stingIn)countCharstatic booleanmatches(String address, String pattern)matchesstatic booleanmatches(InetAddress address, String pattern)static booleanmatchNumericListOrRange(String value, String patterns)static booleanmatchNumericListOrRange(String value, String patterns, org.opennms.core.utils.IPLike.RangeMatcher matcher)Use this method to match ranges, lists, and specific number strings such as: "200-300" or "200,300,501-700" "*" matches any This method is commonly used for matching IP octets or portsstatic booleanmatchRange(String value, String pattern)Helper method in support of matchNumericListOrRangestatic booleanmatchRangeHex(String value, String pattern)Helper method in support of matchNumericListOrRange
-
-
-
Method Detail
-
matches
public static boolean matches(InetAddress address, String pattern)
-
matchNumericListOrRange
public static boolean matchNumericListOrRange(String value, String patterns)
-
matchNumericListOrRange
public static boolean matchNumericListOrRange(String value, String patterns, org.opennms.core.utils.IPLike.RangeMatcher matcher)
Use this method to match ranges, lists, and specific number strings such as: "200-300" or "200,300,501-700" "*" matches any This method is commonly used for matching IP octets or ports
-
matchRange
public static boolean matchRange(String value, String pattern)
Helper method in support of matchNumericListOrRange
-
matchRangeHex
public static boolean matchRangeHex(String value, String pattern)
Helper method in support of matchNumericListOrRange
-
-