kmy.regex.util
Class CaseInsensitiveRegex

java.lang.Object
  |
  +--kmy.regex.util.Regex
        |
        +--kmy.regex.util.ProxyRegex
              |
              +--kmy.regex.util.CaseInsensitiveRegex

public class CaseInsensitiveRegex
extends ProxyRegex


Field Summary
private  char[] cMatch
           
private  java.lang.Object[] extBuf
           
private  int[] extOff
           
private  int[] handleToExtHandle
           
private  int matchOff
           
 
Fields inherited from class kmy.regex.util.ProxyRegex
regex
 
Fields inherited from class kmy.regex.util.Regex
factory
 
Constructor Summary
CaseInsensitiveRegex(Regex lowerCaseRegex)
           
CaseInsensitiveRegex(java.lang.String regex)
           
 
Method Summary
 char[] getCharBuffer(int extHandle)
          Returns external variable buffer by its buffer handle.
 int getIndex(int handle)
          Returns external or internal variable index using its index handle.
 int getMatchEnd()
          After successiful search returns matching substring's final position in the input buffer (that was set up by init method).
 int getMatchStart()
          After successiful search returns matching substring's initial position in the input buffer (that was set up by init method).
 void init(char[] arr, int off, int len)
          Prepares to match or search.
private  void init(int extHandle, char[] arr, int off, int len)
           
 void setExtVariableBuffer(int extHandle, char[] arr)
          Assignes external variable buffer by its buffer handle.
 void setIndex(int handle, int index)
          Returns internal variable index using its index handle.
 java.lang.String toString()
           
 
Methods inherited from class kmy.regex.util.ProxyRegex
cloneRegex, getExtVariableHandle, getVariableHandle, match, matchWhole, search, searchAgain, setRefilledBuffer, setRefiller, variables
 
Methods inherited from class kmy.regex.util.Regex
accept, clone, createFilePattern, createLowerCaseRegex, createRegex, createRegex, createRegex, get, getMatch, getMatchString, init, init, initFactory, matches, matches, matchesWhole, matchesWhole, searchOnce, searchOnce, searchOnce, searchOnce, set, setExtVariable, setExtVariable, setExtVariable, setExtVariable, setFactory
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

matchOff

private int matchOff

cMatch

private char[] cMatch

handleToExtHandle

private int[] handleToExtHandle

extOff

private int[] extOff

extBuf

private java.lang.Object[] extBuf
Constructor Detail

CaseInsensitiveRegex

public CaseInsensitiveRegex(java.lang.String regex)

CaseInsensitiveRegex

public CaseInsensitiveRegex(Regex lowerCaseRegex)
Method Detail

init

public void init(char[] arr,
                 int off,
                 int len)
Description copied from class: Regex
Prepares to match or search. Sets up an input buffer and a range of characters in it that is to be searched or matched.
Overrides:
init in class ProxyRegex

init

private void init(int extHandle,
                  char[] arr,
                  int off,
                  int len)

getIndex

public int getIndex(int handle)
Description copied from class: Regex
Returns external or internal variable index using its index handle. Every variable has two indices - 'begin' and 'end'. Use 'begin' and 'end' handles to get them. These indices can be used to determine which part of the input buffer (set by init method) corresponding internal variable matched. An external variable 'begin' and 'end' indices point to its own buffer. They are assinged by setIndex and are never changed.
Overrides:
getIndex in class ProxyRegex

setIndex

public void setIndex(int handle,
                     int index)
Description copied from class: Regex
Returns internal variable index using its index handle. Every variable has two indices - 'begin' and 'end'. Use 'begin' and 'end' handles to assign them. These indices are needed to completely specify value of an external variable.
Overrides:
setIndex in class ProxyRegex

getMatchStart

public int getMatchStart()
Description copied from class: Regex
After successiful search returns matching substring's initial position in the input buffer (that was set up by init method).
Overrides:
getMatchStart in class ProxyRegex

getMatchEnd

public int getMatchEnd()
Description copied from class: Regex
After successiful search returns matching substring's final position in the input buffer (that was set up by init method).
Overrides:
getMatchEnd in class ProxyRegex

getCharBuffer

public char[] getCharBuffer(int extHandle)
Description copied from class: Regex
Returns external variable buffer by its buffer handle. If -1 is passed as a handle the input buffer that was set up for matching (using init) is returned.
Overrides:
getCharBuffer in class ProxyRegex

setExtVariableBuffer

public void setExtVariableBuffer(int extHandle,
                                 char[] arr)
Description copied from class: Regex
Assignes external variable buffer by its buffer handle. It is needed to completely specify value of an external variable.
Overrides:
setExtVariableBuffer in class ProxyRegex

toString

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