are both arbitrary strings.
unquoted whitespaces are ignored.
'xxx' can be used to quote characters
One difference from Collator is that & is used to reset to a current
point. Or, in other words, it introduces a new sequence which is to
be added to the old.
That is: "a < b < c < d" is the same as "a < b & b < c & c < d" OR
"a < b < d & b < c"
XXX: make '' be a single quote.
- Author:
- Mark Davis, Helena Shih
- See Also:
PatternEntry
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
patterns
ArrayList patterns
saveEntry
private transient PatternEntry saveEntry
lastEntry
private transient PatternEntry lastEntry
excess
private transient StringBuffer excess
statusArray
private transient byte[] statusArray
BITARRAYMASK
private final byte BITARRAYMASK
- See Also:
- Constant Field Values
BYTEPOWER
private final int BYTEPOWER
- See Also:
- Constant Field Values
BYTEMASK
private final int BYTEMASK
- See Also:
- Constant Field Values
MergeCollation
public MergeCollation(String pattern)
throws ParseException
- Creates from a pattern
- Throws:
ParseException
- If the input pattern is incorrect.
getPattern
public String getPattern()
- recovers current pattern
getPattern
public String getPattern(boolean withWhiteSpace)
- recovers current pattern.
- Parameters:
withWhiteSpace
- puts spacing around the entries, and \n
before & and <
findLastWithNoExtension
private final PatternEntry findLastWithNoExtension(int i)
emitPattern
public String emitPattern()
- emits the pattern for collation builder.
- Returns:
- emits the string in the format understable to the collation
builder.
emitPattern
public String emitPattern(boolean withWhiteSpace)
- emits the pattern for collation builder.
- Parameters:
withWhiteSpace
- puts spacing around the entries, and \n
before & and <
- Returns:
- emits the string in the format understable to the collation
builder.
setPattern
public void setPattern(String pattern)
throws ParseException
- sets the pattern.
- Throws:
ParseException
addPattern
public void addPattern(String pattern)
throws ParseException
- adds a pattern to the current one.
- Parameters:
pattern
- the new pattern to be added
- Throws:
ParseException
getCount
public int getCount()
- gets count of separate entries
- Returns:
- the size of pattern entries
getItemAt
public PatternEntry getItemAt(int index)
- gets count of separate entries
- Parameters:
index
- the offset of the desired pattern entry
- Returns:
- the requested pattern entry
fixEntry
private final void fixEntry(PatternEntry newEntry)
throws ParseException
- Throws:
ParseException
findLastEntry
private final int findLastEntry(PatternEntry entry,
StringBuffer excessChars)
throws ParseException
- Throws:
ParseException