com.stevenrbrandt.ubiq2.v4.pattwo
Class Pattern

java.lang.Object
  extended by com.stevenrbrandt.ubiq2.v4.pattwo.Pattern

public class Pattern
extends java.lang.Object

Very similar in function to java.util.regex.Pattern. Noteable differences:

  1. Designed to use low memory. Should never result in a stack overflow. This means, however, that certain complex patterns could take a very long time to match.
  2. The set of character entities is more limited. Than what Sun provides. You can, however, add your own using the addEntity method.
  3. (?<=X) and (?<!X) are not supported.
  4. requireEnd() is missing and will not be supplied. I think it's purpose is to support matching on a stream. I offer a different way to do this (see the Loader).
  5. Various methods missing -- these may trickle in.


Constructor Summary
Pattern()
           
 
Method Summary
static void addEntity(Entity e)
           
static Pattern compile(java.lang.String s)
           
 Matcher matcher(java.lang.CharSequence s)
           
 Matcher matcher(CharStream s)
          Used for matching against an IOStream, etc.
 Matcher matcher(java.io.Reader r)
           
 java.lang.String toString()
           
static java.lang.String toString(com.stevenrbrandt.ubiq2.v4.pattwo.PatElem[] elems)
           
static java.lang.String toString(java.util.Vector<com.stevenrbrandt.ubiq2.v4.pattwo.PatElem> elems)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pattern

public Pattern()
Method Detail

addEntity

public static void addEntity(Entity e)

matcher

public Matcher matcher(java.lang.CharSequence s)

matcher

public Matcher matcher(CharStream s)
Used for matching against an IOStream, etc. See Loader and the LoadTest example.


matcher

public Matcher matcher(java.io.Reader r)

compile

public static Pattern compile(java.lang.String s)

toString

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

toString

public static java.lang.String toString(java.util.Vector<com.stevenrbrandt.ubiq2.v4.pattwo.PatElem> elems)

toString

public static java.lang.String toString(com.stevenrbrandt.ubiq2.v4.pattwo.PatElem[] elems)