Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jchrest.lib
Class StringPattern

    java.lang.Object
      jchrest.lib.Pattern
          jchrest.lib.PrimitivePattern
              jchrest.lib.StringPattern

    public class StringPattern

extends PrimitivePattern

The StringPattern is a type of PrimitivePattern used to hold Strings. The String is treated as a single object, and cannot be decomposed into smaller elements, such as letters. Instances of this class are immutable.

Method Summary
`static StringPattern` | `create(java.lang.String name)` Static creator method tries to retrieve a cached pattern for given string, else creates and returns a new instance of StringPattern.
`boolean` | `equalPrimitive(PrimitivePattern pattern)` Two StringPatterns are only equal if their stored names are the same.
`java.lang.String` | `getString()` Accessor method for the stored name.
`boolean` | `matches(Pattern pattern)` Two StringPatterns only match if their stored names are the same.
`java.lang.String` | `toString()` Return a string representation of this pattern.

Methods inherited from class jchrest.lib.Pattern
`makeActionList, makeNumber, makeString, makeVerbalList, makeVerbalList, makeVisualList, makeVisualList`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### create

    public static StringPattern create(java.lang.String name)

  Static creator method tries to retrieve a cached pattern for given string, else creates and returns a new instance of StringPattern.

### getString

    public java.lang.String getString()

  Accessor method for the stored name.

### equalPrimitive

    public boolean equalPrimitive(PrimitivePattern pattern)

  Two StringPatterns are only equal if their stored names are the same.

  Specified by:
    `equalPrimitive` in class `PrimitivePattern`

### matches

    public boolean matches(Pattern pattern)

  Two StringPatterns only match if their stored names are the same.

  Specified by:
    `matches` in class `Pattern`

### toString

    public java.lang.String toString()

  Return a string representation of this pattern.

  Specified by:
    `toString` in class `Pattern`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD