code: public static boolean isCase(Pattern caseValue, Object switchValue) {
          if (switchValue == null) {
              return caseValue == null;
          }
          final Matcher matcher = caseValue.matcher(switchValue.toString());
          if (matcher.matches()) {
              RegexSupport.setLastMatcher(matcher);
              return true;
          } else {
              return false;
          }
      }
docs: 'Case' implementation for the {@link java.util.regex.Pattern} class, which allows
  testing a String against a number of regular expressions.
  For example:
  <pre>switch( str ) {
  case ~/one/ :
  // the regex 'one' matches the value of str
  }
  </pre>
  Note that this returns true for the case where both the pattern and
  the 'switch' values are <code>null</code>.
  
  @param caseValue   the case value
  @param switchValue the switch value
  @return true if the switchValue is deemed to match the caseValue
  @since 1.0