org.opennms.core.utils
Class IPLike
java.lang.Object
org.opennms.core.utils.IPLike
public class IPLike
- extends Object
|
Method Summary |
static int |
countChar(char charIn,
String stingIn)
|
static boolean |
matches(String address,
String pattern)
|
static boolean |
matchNumericListOrRange(String value,
String patterns)
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 |
static boolean |
matchRange(String value,
String pattern)
Helper method in support of matchNumericListOrRange |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
matches
public static boolean matches(String address,
String pattern)
matchNumericListOrRange
public static boolean matchNumericListOrRange(String value,
String patterns)
- 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
- Parameters:
value - patterns -
- Returns:
matchRange
public static boolean matchRange(String value,
String pattern)
- Helper method in support of matchNumericListOrRange
- Parameters:
value - pattern -
- Returns:
countChar
public static int countChar(char charIn,
String stingIn)
Copyright © 2009. All Rights Reserved.