jchrest.lib
Class Pattern

java.lang.Object
  extended by jchrest.lib.Pattern
Direct Known Subclasses:
ListPattern, PrimitivePattern

public abstract class Pattern
extends java.lang.Object

Parent class of all patterns.


Constructor Summary
Pattern()
           
 
Method Summary
static ListPattern makeActionList(java.lang.String[] strings)
           
static NumberPattern makeNumber(int number)
          Factory method to make a NumberPattern.
static StringPattern makeString(java.lang.String str)
          Factory method to make a StringPattern.
static ListPattern makeVerbalList(int[] numbers)
           
static ListPattern makeVerbalList(java.lang.String[] strings)
           
static ListPattern makeVisualList(int[] numbers)
          Factory method to make a ListPattern given an array of numbers.
static ListPattern makeVisualList(java.lang.String[] strings)
          Factory method to make a ListPattern given an array of Strings.
abstract  boolean matches(Pattern pattern)
           
abstract  java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pattern

public Pattern()
Method Detail

makeNumber

public static NumberPattern makeNumber(int number)
Factory method to make a NumberPattern.


makeString

public static StringPattern makeString(java.lang.String str)
Factory method to make a StringPattern.


makeVisualList

public static ListPattern makeVisualList(int[] numbers)
Factory method to make a ListPattern given an array of numbers. Each number is converted into a NumberPattern and added to the ListPattern.


makeVerbalList

public static ListPattern makeVerbalList(int[] numbers)

makeVisualList

public static ListPattern makeVisualList(java.lang.String[] strings)
Factory method to make a ListPattern given an array of Strings. Each number is converted into a StringPattern and added to the ListPattern.


makeVerbalList

public static ListPattern makeVerbalList(java.lang.String[] strings)

makeActionList

public static ListPattern makeActionList(java.lang.String[] strings)

matches

public abstract boolean matches(Pattern pattern)

toString

public abstract java.lang.String toString()
Overrides:
toString in class java.lang.Object