Top Description Inners Fields Constructors Methods
com.sun.msv.datatype.regexp

pack-priv Class RegularExpression

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.text.CharacterIterator

A regular expression matching engine using Non-deterministic Finite Automaton (NFA). This engine does not conform to the POSIX regular expression.

How to use

A. Standard way
 RegularExpression re = new RegularExpression(regex);
 if (re.matches(text)) { ... }
 
B. Capturing groups
 RegularExpression re = new RegularExpression(regex);
 Match match = new Match();
 if (re.matches(text, match)) {
     ... // You can refer captured texts with methods of the Match class.
 }
 

Case-insensitive matching

 RegularExpression re = new RegularExpression(regex, "i");
 if (re.matches(text) >= 0) { ...}
 

Options

You can specify options to RegularExpression(regex, options) or setPattern(regex, options). This options parameter consists of the following characters.

"i"
This option indicates case-insensitive matching.
"m"
^ and $ consider the EOL characters within the text.
"s"
. matches any one character.
"u"
Redefines \d \D \w \W \s \S \b \B \< \> as becoming to Unicode.
"w"
By this option, \b \B \< \> are processed with the method of 'Unicode Regular Expression Guidelines' Revision 4. When "w" and "u" are specified at the same time, \b \B \< \> are processed for the "w" option.
","
The parser treats a comma in a character class as a range separator. [a,b] matches a or , or b without this option. [a,b] matches a or b with this option.
"X"
By this option, the engine confoms to XML Schema: Regular Expression. The match() method does not do subsring matching but entire string matching.

Syntax

Differences from the Perl 5 regular expression

  • There is 6-digit hexadecimal character representation (\vHHHHHH.)
  • Supports subtraction, union, and intersection operations for character classes.
  • Not supported: \ooo (Octal character representations), \G, \C, \lc, \ uc, \L, \U, \E, \Q, \N{name}, (?{code}), (??{code})

Meta characters are `. * + ? { [ ( ) | \ ^ $'.


BNF for the regular expression

 regex ::= ('(?' options ')')? term ('|' term)*
 term ::= factor+
 factor ::= anchors | atom (('*' | '+' | '?' | minmax ) '?'? )?
            | '(?#' [^)]* ')'
 minmax ::= '{' ([0-9]+ | [0-9]+ ',' | ',' [0-9]+ | [0-9]+ ',' [0-9]+) '}'
 atom ::= char | '.' | char-class | '(' regex ')' | '(?:' regex ')' | '\' [0-9]
          | '\w' | '\W' | '\d' | '\D' | '\s' | '\S' | category-block | '\X'
          | '(?>' regex ')' | '(?' options ':' regex ')'
          | '(?' ('(' [0-9] ')' | '(' anchors ')' | looks) term ('|' term)? ')'
 options ::= [imsw]* ('-' [imsw]+)?
 anchors ::= '^' | '$' | '\A' | '\Z' | '\z' | '\b' | '\B' | '\<' | '\>'
 looks ::= '(?=' regex ')'  | '(?!' regex ')'
           | '(?<=' regex ')' | '(?<!' regex ')'
 char ::= '\\' | '\' [efnrtv] | '\c' [@-_] | code-point | character-1
 category-block ::= '\' [pP] category-symbol-1
                    | ('\p{' | '\P{') (category-symbol | block-name
                                       | other-properties) '}'
 category-symbol-1 ::= 'L' | 'M' | 'N' | 'Z' | 'C' | 'P' | 'S'
 category-symbol ::= category-symbol-1 | 'Lu' | 'Ll' | 'Lt' | 'Lm' | Lo'
                     | 'Mn' | 'Me' | 'Mc' | 'Nd' | 'Nl' | 'No'
                     | 'Zs' | 'Zl' | 'Zp' | 'Cc' | 'Cf' | 'Cn' | 'Co' | 'Cs'
                     | 'Pd' | 'Ps' | 'Pe' | 'Pc' | 'Po'
                     | 'Sm' | 'Sc' | 'Sk' | 'So'
 block-name ::= (See above)
 other-properties ::= 'ALL' | 'ASSIGNED' | 'UNASSIGNED'
 character-1 ::= (any character except meta-characters)

 char-class ::= '[' ranges ']'
                | '(?[' ranges ']' ([-+&] '[' ranges ']')? ')'
 ranges ::= '^'? (range ','?)+
 range ::= '\d' | '\w' | '\s' | '\D' | '\W' | '\S' | category-block
           | range-char | range-char '-' range-char
 range-char ::= '\[' | '\]' | '\\' | '\' [,-efnrtv] | code-point | character-2
 code-point ::= '\x' hex-char hex-char
                | '\x{' hex-char+ '}'
                | '\v' hex-char hex-char hex-char hex-char hex-char hex-char
 hex-char ::= [0-9a-fA-F]
 character-2 ::= (any character except \[]-,)
 

TODO


Author
TAMURA Kent <[email protected]>
Version
RegularExpression.java,v 1.7 2003/07/15 12:28:25 neeraj Exp

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv transient RegularExpression.Context
pack-priv static final boolean
pack-priv static final int
pack-priv transient RangeToken
pack-priv transient String
pack-priv transient boolean
pack-priv transient int
pack-priv transient BMPattern
pack-priv boolean
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv transient int
pack-priv static final int
pack-priv int
nofparen

The number of parenthesis in the regular expression.

pack-priv transient int
pack-priv transient Op
pack-priv int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv String
regex

A regular expression.

pack-priv static final int
pack-priv static final int
pack-priv Token
tokentree

Internal representation of the regular expression.

pack-priv static final int
pack-priv static final int
USE_UNICODE_CATEGORY

This option redefines \d \D \w \W \s \S.

private static final int
private static final int
private static final int
pack-priv static final int

Constructor Summary

AccessConstructor and Description
public
RegularExpression(String
A regular expression
regex
)

Creates a new RegularExpression instance.

public
RegularExpression(String
A regular expression
regex
,
String
A String consisted of "i" "m" "s" "u" "w" "," "X"
options
)

Creates a new RegularExpression instance with options.

pack-priv
RegularExpression(String regex, Token tok, int parens, boolean hasBackReferences, int options)

Method Summary

Modifier and TypeMethod and Description
private synchronized void
compile(Token tok)

Compiles a token tree into an operation flow.

private Op
compile(Token tok, Op next, boolean reverse)

Converts a token to an operation.

public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Return true if patterns are the same and the options are equivalent.
pack-priv boolean
equals(String pattern, int options)

public int
getNumberOfGroups()

Return the number of regular expression groups.

public String
getOptions()

Returns a option string.

public String
private static final int
getPreviousWordType(char[] target, int begin, int end, int offset, int opts)

private static final int
getPreviousWordType(String target, int begin, int end, int offset, int opts)

private static final int
getPreviousWordType(CharacterIterator target, int begin, int end, int offset, int opts)

private static final int
getWordType(char[] target, int begin, int end, int offset, int opts)

private static final int
getWordType(String target, int begin, int end, int offset, int opts)

private static final int
getWordType(CharacterIterator target, int begin, int end, int offset, int opts)

private static final int
getWordType0(char ch, int opts)

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
private static final boolean
isEOLChar(int ch)

private static final boolean
isSet(int options, int flag)

private static final boolean
isWordChar(int ch)

private int

Returns:

-1 when not match; offset of the end of matched string when match.
matchCharacterIterator
(RegularExpression.Context con, Op op, int offset, int dx, int opts)

private int

Returns:

-1 when not match; offset of the end of matched string when match.
matchCharArray
(RegularExpression.Context con, Op op, int offset, int dx, int opts)

public boolean

Returns:

true if the target is matched to this regular expression.
matches
(char[] target)

Checks whether the target text contains this pattern or not.

public boolean

Returns:

true if the target is matched to this regular expression.
matches
(char[] target, int
Start offset of the range.
start
,
int
End offset +1 of the range.
end
)

Checks whether the target text contains this pattern in specified range or not.

public boolean

Returns:

Offset of the start position in target; or -1 if not match.
matches
(char[] target, Match
A Match instance for storing matching result.
match
)

Checks whether the target text contains this pattern or not.

public boolean

Returns:

Offset of the start position in target; or -1 if not match.
matches
(char[] target, int
Start offset of the range.
start
,
int
End offset +1 of the range.
end
,
Match
A Match instance for storing matching result.
match
)

Checks whether the target text contains this pattern in specified range or not.

public boolean

Returns:

true if the target is matched to this regular expression.
matches
(String target)

Checks whether the target text contains this pattern or not.

public boolean

Returns:

true if the target is matched to this regular expression.
matches
(String target, int
Start offset of the range.
start
,
int
End offset +1 of the range.
end
)

Checks whether the target text contains this pattern in specified range or not.

public boolean

Returns:

Offset of the start position in target; or -1 if not match.
matches
(String target, Match
A Match instance for storing matching result.
match
)

Checks whether the target text contains this pattern or not.

public boolean

Returns:

Offset of the start position in target; or -1 if not match.
matches
(String target, int
Start offset of the range.
start
,
int
End offset +1 of the range.
end
,
Match
A Match instance for storing matching result.
match
)

Checks whether the target text contains this pattern in specified range or not.

public boolean

Returns:

true if the target is matched to this regular expression.
matches
(CharacterIterator target)

Checks whether the target text contains this pattern or not.

public boolean

Returns:

Offset of the start position in target; or -1 if not match.
matches
(CharacterIterator target, Match
A Match instance for storing matching result.
match
)

Checks whether the target text contains this pattern or not.

private static final boolean
matchIgnoreCase(int chardata, int ch)

private int

Returns:

-1 when not match; offset of the end of matched string when match.
matchString
(RegularExpression.Context con, Op op, int offset, int dx, int opts)

pack-priv void
prepare()

Prepares for matching.

private static final boolean
regionMatches(char[] target, int offset, int limit, String part, int partlen)

private static final boolean
regionMatches(char[] target, int offset, int limit, int offset2, int partlen)

private static final boolean
regionMatches(String text, int offset, int limit, String part, int partlen)

private static final boolean
regionMatches(String text, int offset, int limit, int offset2, int partlen)

private static final boolean
regionMatches(CharacterIterator target, int offset, int limit, String part, int partlen)

private static final boolean
regionMatches(CharacterIterator target, int offset, int limit, int offset2, int partlen)

private static final boolean
regionMatchesIgnoreCase(char[] target, int offset, int limit, String part, int partlen)

private static final boolean
regionMatchesIgnoreCase(char[] target, int offset, int limit, int offset2, int partlen)

private static final boolean
regionMatchesIgnoreCase(String text, int offset, int limit, String part, int partlen)

private static final boolean
regionMatchesIgnoreCase(String text, int offset, int limit, int offset2, int partlen)

private static final boolean
regionMatchesIgnoreCase(CharacterIterator target, int offset, int limit, String part, int partlen)

private static final boolean
regionMatchesIgnoreCase(CharacterIterator target, int offset, int limit, int offset2, int partlen)

public void
setPattern(String newPattern)

private void
setPattern(String newPattern, int options)

public void
setPattern(String newPattern, String options)

public String
toString()

Overrides java.lang.Object.toString.

Represents this instence in String.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

CARRIAGE_RETURNback to summary
pack-priv static final int CARRIAGE_RETURN
contextback to summary
pack-priv transient RegularExpression.Context context
DEBUGback to summary
pack-priv static final boolean DEBUG
EXTENDED_COMMENTback to summary
pack-priv static final int EXTENDED_COMMENT

"x"

firstCharback to summary
pack-priv transient RangeToken firstChar
fixedStringback to summary
pack-priv transient String fixedString
fixedStringOnlyback to summary
pack-priv transient boolean fixedStringOnly
fixedStringOptionsback to summary
pack-priv transient int fixedStringOptions
fixedStringTableback to summary
pack-priv transient BMPattern fixedStringTable
hasBackReferencesback to summary
pack-priv boolean hasBackReferences
IGNORE_CASEback to summary
pack-priv static final int IGNORE_CASE

"i"

LINE_FEEDback to summary
pack-priv static final int LINE_FEED
LINE_SEPARATORback to summary
pack-priv static final int LINE_SEPARATOR
minlengthback to summary
pack-priv transient int minlength
MULTIPLE_LINESback to summary
pack-priv static final int MULTIPLE_LINES

"m"

nofparenback to summary
pack-priv int nofparen

The number of parenthesis in the regular expression.

numberOfClosuresback to summary
pack-priv transient int numberOfClosures
operationsback to summary
pack-priv transient Op operations
optionsback to summary
pack-priv int options
PARAGRAPH_SEPARATORback to summary
pack-priv static final int PARAGRAPH_SEPARATOR
PROHIBIT_FIXED_STRING_OPTIMIZATIONback to summary
pack-priv static final int PROHIBIT_FIXED_STRING_OPTIMIZATION

"F"

PROHIBIT_HEAD_CHARACTER_OPTIMIZATIONback to summary
pack-priv static final int PROHIBIT_HEAD_CHARACTER_OPTIMIZATION

"H"

regexback to summary
pack-priv String regex

A regular expression.

SINGLE_LINEback to summary
pack-priv static final int SINGLE_LINE

"s"

SPECIAL_COMMAback to summary
pack-priv static final int SPECIAL_COMMA

",".

tokentreeback to summary
pack-priv Token tokentree

Internal representation of the regular expression.

UNICODE_WORD_BOUNDARYback to summary
pack-priv static final int UNICODE_WORD_BOUNDARY

An option. This enables to process locale-independent word boundary for \b \B \< \>.

By default, the engine considers a position between a word character (\w) and a non word character is a word boundary.

By this option, the engine checks word boundaries with the method of 'Unicode Regular Expression Guidelines' Revision 4.

See Also
setPattern(java.lang.String, int)
USE_UNICODE_CATEGORYback to summary
pack-priv static final int USE_UNICODE_CATEGORY

This option redefines \d \D \w \W \s \S.

See Also
setPattern(java.lang.String, int), UNICODE_WORD_BOUNDARY
WT_IGNOREback to summary
private static final int WT_IGNORE
WT_LETTERback to summary
private static final int WT_LETTER
WT_OTHERback to summary
private static final int WT_OTHER
XMLSCHEMA_MODEback to summary
pack-priv static final int XMLSCHEMA_MODE

"X". XML Schema mode.

Constructor Detail

RegularExpressionback to summary
public RegularExpression(String regex) throws ParseException

Creates a new RegularExpression instance.

Parameters
regex:String

A regular expression

Exceptions
ParseException:
regex is not conforming to the syntax.
RegularExpressionback to summary
public RegularExpression(String regex, String options) throws ParseException

Creates a new RegularExpression instance with options.

Parameters
regex:String

A regular expression

options:String

A String consisted of "i" "m" "s" "u" "w" "," "X"

Exceptions
ParseException:
regex is not conforming to the syntax.
RegularExpressionback to summary
pack-priv RegularExpression(String regex, Token tok, int parens, boolean hasBackReferences, int options)

Method Detail

compileback to summary
private synchronized void compile(Token tok)

Compiles a token tree into an operation flow.

compileback to summary
private Op compile(Token tok, Op next, boolean reverse)

Converts a token to an operation.

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Return true if patterns are the same and the options are equivalent.

Parameters
obj:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

equalsback to summary
pack-priv boolean equals(String pattern, int options)
getNumberOfGroupsback to summary
public int getNumberOfGroups()

Return the number of regular expression groups. This method returns 1 when the regular expression has no capturing-parenthesis.

getOptionsback to summary
public String getOptions()

Returns a option string. The order of letters in it may be different from a string specified in a constructor or setPattern().

See Also
RegularExpression(java.lang.String, java.lang.String), setPattern(java.lang.String, java.lang.String)
getPatternback to summary
public String getPattern()
getPreviousWordTypeback to summary
private static final int getPreviousWordType(char[] target, int begin, int end, int offset, int opts)
getPreviousWordTypeback to summary
private static final int getPreviousWordType(String target, int begin, int end, int offset, int opts)
getPreviousWordTypeback to summary
private static final int getPreviousWordType(CharacterIterator target, int begin, int end, int offset, int opts)
getWordTypeback to summary
private static final int getWordType(char[] target, int begin, int end, int offset, int opts)
getWordTypeback to summary
private static final int getWordType(String target, int begin, int end, int offset, int opts)
getWordTypeback to summary
private static final int getWordType(CharacterIterator target, int begin, int end, int offset, int opts)
getWordType0back to summary
private static final int getWordType0(char ch, int opts)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

isEOLCharback to summary
private static final boolean isEOLChar(int ch)
isSetback to summary
private static final boolean isSet(int options, int flag)
isWordCharback to summary
private static final boolean isWordChar(int ch)
matchCharacterIteratorback to summary
private int matchCharacterIterator(RegularExpression.Context con, Op op, int offset, int dx, int opts)
Returns:int

-1 when not match; offset of the end of matched string when match.

matchCharArrayback to summary
private int matchCharArray(RegularExpression.Context con, Op op, int offset, int dx, int opts)
Returns:int

-1 when not match; offset of the end of matched string when match.

matchesback to summary
public boolean matches(char[] target)

Checks whether the target text contains this pattern or not.

Returns:boolean

true if the target is matched to this regular expression.

matchesback to summary
public boolean matches(char[] target, int start, int end)

Checks whether the target text contains this pattern in specified range or not.

Parameters
start:int

Start offset of the range.

end:int

End offset +1 of the range.

Returns:boolean

true if the target is matched to this regular expression.

matchesback to summary
public boolean matches(char[] target, Match match)

Checks whether the target text contains this pattern or not.

Parameters
match:Match

A Match instance for storing matching result.

Returns:boolean

Offset of the start position in target; or -1 if not match.

matchesback to summary
public boolean matches(char[] target, int start, int end, Match match)

Checks whether the target text contains this pattern in specified range or not.

Parameters
start:int

Start offset of the range.

end:int

End offset +1 of the range.

match:Match

A Match instance for storing matching result.

Returns:boolean

Offset of the start position in target; or -1 if not match.

matchesback to summary
public boolean matches(String target)

Checks whether the target text contains this pattern or not.

Returns:boolean

true if the target is matched to this regular expression.

matchesback to summary
public boolean matches(String target, int start, int end)

Checks whether the target text contains this pattern in specified range or not.

Parameters
start:int

Start offset of the range.

end:int

End offset +1 of the range.

Returns:boolean

true if the target is matched to this regular expression.

matchesback to summary
public boolean matches(String target, Match match)

Checks whether the target text contains this pattern or not.

Parameters
match:Match

A Match instance for storing matching result.

Returns:boolean

Offset of the start position in target; or -1 if not match.

matchesback to summary
public boolean matches(String target, int start, int end, Match match)

Checks whether the target text contains this pattern in specified range or not.

Parameters
start:int

Start offset of the range.

end:int

End offset +1 of the range.

match:Match

A Match instance for storing matching result.

Returns:boolean

Offset of the start position in target; or -1 if not match.

matchesback to summary
public boolean matches(CharacterIterator target)

Checks whether the target text contains this pattern or not.

Returns:boolean

true if the target is matched to this regular expression.

matchesback to summary
public boolean matches(CharacterIterator target, Match match)

Checks whether the target text contains this pattern or not.

Parameters
match:Match

A Match instance for storing matching result.

Returns:boolean

Offset of the start position in target; or -1 if not match.

matchIgnoreCaseback to summary
private static final boolean matchIgnoreCase(int chardata, int ch)
matchStringback to summary
private int matchString(RegularExpression.Context con, Op op, int offset, int dx, int opts)
Returns:int

-1 when not match; offset of the end of matched string when match.

prepareback to summary
pack-priv void prepare()

Prepares for matching. This method is called just before starting matching.

regionMatchesback to summary
private static final boolean regionMatches(char[] target, int offset, int limit, String part, int partlen)
regionMatchesback to summary
private static final boolean regionMatches(char[] target, int offset, int limit, int offset2, int partlen)
regionMatchesback to summary
private static final boolean regionMatches(String text, int offset, int limit, String part, int partlen)
regionMatchesback to summary
private static final boolean regionMatches(String text, int offset, int limit, int offset2, int partlen)
regionMatchesback to summary
private static final boolean regionMatches(CharacterIterator target, int offset, int limit, String part, int partlen)
regionMatchesback to summary
private static final boolean regionMatches(CharacterIterator target, int offset, int limit, int offset2, int partlen)
regionMatchesIgnoreCaseback to summary
private static final boolean regionMatchesIgnoreCase(char[] target, int offset, int limit, String part, int partlen)
regionMatchesIgnoreCaseback to summary
private static final boolean regionMatchesIgnoreCase(char[] target, int offset, int limit, int offset2, int partlen)
regionMatchesIgnoreCaseback to summary
private static final boolean regionMatchesIgnoreCase(String text, int offset, int limit, String part, int partlen)
regionMatchesIgnoreCaseback to summary
private static final boolean regionMatchesIgnoreCase(String text, int offset, int limit, int offset2, int partlen)
regionMatchesIgnoreCaseback to summary
private static final boolean regionMatchesIgnoreCase(CharacterIterator target, int offset, int limit, String part, int partlen)
regionMatchesIgnoreCaseback to summary
private static final boolean regionMatchesIgnoreCase(CharacterIterator target, int offset, int limit, int offset2, int partlen)
setPatternback to summary
public void setPattern(String newPattern) throws ParseException
setPatternback to summary
private void setPattern(String newPattern, int options) throws ParseException
setPatternback to summary
public void setPattern(String newPattern, String options) throws ParseException
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Represents this instence in String.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object.

com.sun.msv.datatype.regexp back to summary

pack-priv final Class RegularExpression.Context

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv char[]
pack-priv CharacterIterator
pack-priv boolean
pack-priv int
pack-priv int
pack-priv Match
pack-priv int[]
pack-priv int
pack-priv String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
reset(CharacterIterator target, int start, int limit, int nofclosures)

pack-priv void
reset(String target, int start, int limit, int nofclosures)

pack-priv void
reset(char[] target, int start, int limit, int nofclosures)

private void
resetCommon(int nofclosures)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

charTargetback to summary
pack-priv char[] charTarget
ciTargetback to summary
pack-priv CharacterIterator ciTarget
inuseback to summary
pack-priv boolean inuse
lengthback to summary
pack-priv int length
limitback to summary
pack-priv int limit
matchback to summary
pack-priv Match match
offsetsback to summary
pack-priv int[] offsets
startback to summary
pack-priv int start
strTargetback to summary
pack-priv String strTarget

Constructor Detail

Contextback to summary
pack-priv Context()

Method Detail

resetback to summary
pack-priv void reset(CharacterIterator target, int start, int limit, int nofclosures)
resetback to summary
pack-priv void reset(String target, int start, int limit, int nofclosures)
resetback to summary
pack-priv void reset(char[] target, int start, int limit, int nofclosures)
resetCommonback to summary
private void resetCommon(int nofclosures)