APIdia Launch Partner
Top Description Inners Fields Constructors Methods
java.text

pack-priv Class PatternEntry

extends Object
Class Inheritance
Imports
java.lang.Character

Utility class for normalizing and merging patterns for collation. This is to be used with MergeCollation for adding patterns to an existing rule table.
Author
Mark Davis, Helena Shih
See Also
MergeCollation

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv String
pack-priv String
pack-priv static final int
pack-priv int
pack-priv static final int

Constructor Summary

AccessConstructor and Description
pack-priv
PatternEntry(int strength, StringBuilder chars, StringBuilder extension)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
addToBuilder(StringBuilder toAddTo, boolean showExtension, boolean showWhiteSpace, PatternEntry lastEntry)

private static void
private void
appendQuotedChars(StringBuilder toAddTo)

Gets the current chars, quoted

private void
appendQuotedExtension(StringBuilder toAddTo)

Gets the current extension, quoted

public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

WARNING this is used for searching in a Vector.

pack-priv final String
getChars()

Gets the core characters of the entry.

pack-priv final String
getExtension()

Gets the expanding characters of the entry.

pack-priv final int
getStrength()

Gets the strength of the entry.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

pack-priv static boolean
isSpecialChar(char ch)

public String
toString()

Overrides java.lang.Object.toString.

For debugging.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

charsback to summary
pack-priv String chars
extensionback to summary
pack-priv String extension
RESETback to summary
pack-priv static final int RESET
strengthback to summary
pack-priv int strength
UNSETback to summary
pack-priv static final int UNSET

Constructor Detail

PatternEntryback to summary
pack-priv PatternEntry(int strength, StringBuilder chars, StringBuilder extension)

Method Detail

addToBuilderback to summary
pack-priv void addToBuilder(StringBuilder toAddTo, boolean showExtension, boolean showWhiteSpace, PatternEntry lastEntry)
appendQuotedback to summary
private static void appendQuoted(String chars, StringBuilder toAddTo)
appendQuotedCharsback to summary
private void appendQuotedChars(StringBuilder toAddTo)

Gets the current chars, quoted

appendQuotedExtensionback to summary
private void appendQuotedExtension(StringBuilder toAddTo)

Gets the current extension, quoted

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

WARNING this is used for searching in a Vector. Because Vector.indexOf doesn't take a comparator, this method is ill-defined and ignores strength.

getCharsback to summary
pack-priv final String getChars()

Gets the core characters of the entry.

getExtensionback to summary
pack-priv final String getExtension()

Gets the expanding characters of the entry.

getStrengthback to summary
pack-priv final int getStrength()

Gets the strength of the entry.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this 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.
isSpecialCharback to summary
pack-priv static boolean isSpecialChar(char ch)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

For debugging.

java.text back to summary

pack-priv Class PatternEntry.Parser

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int
i

private StringBuilder
private StringBuilder
private String

Constructor Summary

AccessConstructor and Description
public
Parser(String pattern)

Method Summary

Modifier and TypeMethod and Description
public PatternEntry
next()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

iback to summary
private int i
newCharsback to summary
private StringBuilder newChars
newExtensionback to summary
private StringBuilder newExtension
patternback to summary
private String pattern

Constructor Detail

Parserback to summary
public Parser(String pattern)

Method Detail

nextback to summary
public PatternEntry next() throws ParseException