Class IDs
- java.lang.Object
-
- org.opendaylight.serviceutils.metrics.IDs
-
public final class IDs extends Object
Validations for "ID" like simple types.- Author:
- Michael Vorburger.ch
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
check(String id, Pattern regexp)
Validate that ID matches regexp Pattern passed as argument.static void
checkOnlyAZ09(String id)
Validate that ID matches regular expression[a-zA-Z][a-zA-Z0-9]*
(upper or lower case letter or digits, but not start with digit, no dots).static void
checkOnlyAZ09Dot(String id)
Validate that ID matches regular expression[a-zA-Z0-9][a-zA-Z0-9.]*
(dots allowed, but not starting with).static void
checkOnlyAZ09Underscore(String id)
Validate that ID matches regular expression[a-zA-Z][a-zA-Z0-9_]*
(underscores allowed, but not starting with; no dots).static void
checkOnlyLowercaseAZ09(String id)
Validate that ID matches regular expression[a-z][a-z0-9]*
(lower case letter or digits, but not start with digit, no dots).
-
-
-
Method Detail
-
checkOnlyLowercaseAZ09
public static void checkOnlyLowercaseAZ09(String id)
Validate that ID matches regular expression[a-z][a-z0-9]*
(lower case letter or digits, but not start with digit, no dots).- Throws:
IllegalArgumentException
- if not matching expected reg exp.
-
checkOnlyAZ09
public static void checkOnlyAZ09(String id)
Validate that ID matches regular expression[a-zA-Z][a-zA-Z0-9]*
(upper or lower case letter or digits, but not start with digit, no dots).- Throws:
IllegalArgumentException
- if not matching expected reg exp.
-
checkOnlyAZ09Underscore
public static void checkOnlyAZ09Underscore(String id)
Validate that ID matches regular expression[a-zA-Z][a-zA-Z0-9_]*
(underscores allowed, but not starting with; no dots).- Throws:
IllegalArgumentException
- if not matching expected reg exp.
-
checkOnlyAZ09Dot
public static void checkOnlyAZ09Dot(String id)
Validate that ID matches regular expression[a-zA-Z0-9][a-zA-Z0-9.]*
(dots allowed, but not starting with).- Throws:
IllegalArgumentException
- if not matching expected reg exp.
-
check
public static void check(String id, Pattern regexp)
Validate that ID matches regexp Pattern passed as argument.- Throws:
IllegalArgumentException
- if not matching expected reg exp.
-
-