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 Link icon

    Modifier and Type
    Method
    Description
    static void
    check(String id, Pattern regexp)
    Validate that ID matches regexp Pattern passed as argument.
    static void
    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
    Validate that ID matches regular expression [a-zA-Z0-9][a-zA-Z0-9.]* (dots allowed, but not starting with).
    static void
    Validate that ID matches regular expression [a-zA-Z][a-zA-Z0-9_]* (underscores allowed, but not starting with; no dots).
    static void
    Validate that ID matches regular expression [a-z][a-z0-9]* (lower case letter or digits, but not start with digit, no dots).

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details Link icon

    • checkOnlyLowercaseAZ09 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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.