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


Class COM.stevesoft.pat.Skip

java.lang.Object
  |
  +--COM.stevesoft.pat.Skip
Subclasses:
Skip2, SkipBMH


public class Skip
extends java.lang.Object
This class is used internally to search ahead for some optimized Regex objects. It searches within a String for occrences of a given String -- like a more flexible version of String.indexOf.

See Also:
Skip2, SkipBMH


Constructor Summary
Skip(java.lang.String s, boolean ign, int o)
          Initialize, give it a String to search for, tell it whether or not to ignoreCase, and what the offset is of the String within the String to be searched.
 
Method Summary
int find(java.lang.String s)
          The same as find(s,0,s.length())
int find(java.lang.String s, int start, int end)
          Searches a given region of text beginning at position start and ending at position end for the skip object.
static int offset(Regex r)
          Determine the offset of the String within the pattern that we are skipping to.
static java.lang.String string(Regex r)
          Examine a Regex to determine what String it will attempt to skip to when searching for patterns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

Skip

public Skip(java.lang.String s,
            boolean ign,
            int o)
Initialize, give it a String to search for, tell it whether or not to ignoreCase, and what the offset is of the String within the String to be searched.
Method Detail

string

public static java.lang.String string(Regex r)
Examine a Regex to determine what String it will attempt to skip to when searching for patterns. Return -1 if we aren't doing this.

offset

public static int offset(Regex r)
Determine the offset of the String within the pattern that we are skipping to. Return -1 if we aren't doing this.

find

public final int find(java.lang.String s)
The same as find(s,0,s.length())

find

public int find(java.lang.String s,
                int start,
                int end)
Searches a given region of text beginning at position start and ending at position end for the skip object.

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