Package: java.util.regex

## [Java] Class Pattern

- java.util.regex.Pattern

-     public class Pattern
      extends Object

  GDK enhancements for Pattern.

  displayName:
    Pattern
  receiverFqcn:
    java.util.regex.Pattern

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `isCase(Object switchValue)` 'Case' implementation for the Pattern class, which allows testing a String against a number of regular expressions.
    `` | `public boolean` | `isNotCase(Object switchValue)` Since: 4.0.0

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `addShutdownHook, any, any, asBoolean, asType, collect, collect, collect, dump, each, eachMatch, eachMatch, eachWithIndex, every, every, find, find, findAll, findAll, findIndexOf, findIndexOf, findIndexValues, findIndexValues, findLastIndexOf, findLastIndexOf, findResult, findResult, findResult, findResult, getAt, getMetaClass, getMetaPropertyValues, getProperties, grep, grep, hasProperty, identity, inject, inject, inspect, invokeMethod, is, isCase, isNotCase, iterator, metaClass, print, print, printf, printf, println, println, println, putAt, respondsTo, respondsTo, setMetaClass, sleep, sleep, split, sprintf, sprintf, stream, tap, toString, use, use, use, with, with, withCloseable, withCloseable, withMethodClosure, withStream, withStream, withTraits`

- - ### Method Detail

    - #### public boolean isCase(Object switchValue)

      'Case' implementation for the Pattern class, which allows testing a String against a number of regular expressions.

      For example:

          switch( str ) {
             case ~/one/ :
               // the regex 'one' matches the value of str
           }

      Note that this returns true for the case where both the pattern and the 'switch' values are `null`.
      Parameters:
        `switchValue` - the switch value
      Returns:
        true if the switchValue is deemed to match the caseValue
      Since:
        1.0

    - #### public boolean isNotCase(Object switchValue)

      Since:
        4.0.0