| java.lang.Object com.ibm.icu.dev.test.util.UnicodeMap
UnicodeMap | final public class UnicodeMap implements Cloneable,Freezable,Externalizable(Code) | | Class for mapping Unicode characters to values
Much smaller storage than using HashMap, and much faster and more compact than
a list of UnicodeSets.
author: Davis |
Inner Class :public interface Composer | |
Inner Class :public static class MapIterator | |
Method Summary | |
void | _checkInvariants() | public static boolean | areEqual(Object a, Object b) | public UnicodeMap | clear() | public Object | cloneAsThawed() Standard clone. | public UnicodeMap | composeWith(UnicodeMap other, Composer composer) | public UnicodeMap | composeWith(UnicodeSet set, Object value, Composer composer) | public boolean | equals(Object other) | static int | findCommon(String last, String s) | public String | fold(String source) Change a new string from the source string according to the mappings. | public Object | freeze() | public Collection | getAvailableValues(Collection result) Returns the list of possible values. | public Collection | getAvailableValues() | public boolean | getErrorOnReset() | public int | getHashCode(Object o) | public UnicodeSet | getSet(Object value, UnicodeSet result) Returns the set associated with a given value. | public UnicodeSet | getSet(Object value) | public Object | getValue(int codepoint) Gets the value associated with a given code point. | public int | hashCode() | public boolean | isFrozen() | public UnicodeSet | keySet() | public UnicodeMap | put(int codepoint, Object value) Sets the codepoint value. | public UnicodeMap | putAll(UnicodeSet codepoints, Object value) Adds bunch o' codepoints; otherwise like put. | public UnicodeMap | putAll(int startCodePoint, int endCodePoint, Object value) Adds bunch o' codepoints; otherwise like add. | public UnicodeMap | putAll(UnicodeProperty prop) | public UnicodeMap | putAll(UnicodeMap prop) | public void | readExternal(ObjectInput in1) | public void | setErrorOnReset(boolean errorOnReset) | public UnicodeMap | setMissing(Object value) Set the currently unmapped Unicode code points to the given value. | public String | toString() | public String | toString(Comparator collected) | public void | writeExternal(ObjectOutput out1) |
ASSERTIONS | final static boolean ASSERTIONS(Code) | | |
DEBUG_WRITE | final static boolean DEBUG_WRITE(Code) | | |
GROWTH_GAP | final static long GROWTH_GAP(Code) | | |
GROWTH_PERCENT | final static long GROWTH_PERCENT(Code) | | |
_checkInvariants | void _checkInvariants()(Code) | | |
cloneAsThawed | public Object cloneAsThawed()(Code) | | Standard clone. Warning, as with Collections, does not do deep clone.
|
fold | public String fold(String source)(Code) | | Change a new string from the source string according to the mappings. For each code point cp, if getValue(cp) is null, append the character, otherwise append getValue(cp).toString()
Parameters: source - |
getAvailableValues | public Collection getAvailableValues(Collection result)(Code) | | Returns the list of possible values. Deposits each non-null value into
result. Creates result if it is null. Remember to clear result if
you are not appending to existing collection.
Parameters: result - result |
getAvailableValues | public Collection getAvailableValues()(Code) | | Convenience method
|
getErrorOnReset | public boolean getErrorOnReset()(Code) | | Returns the errorOnReset. |
getSet | public UnicodeSet getSet(Object value, UnicodeSet result)(Code) | | Returns the set associated with a given value. Deposits into
result if it is not null. Remember to clear if you just want
the new values.
Parameters: value - Parameters: result - result |
getValue | public Object getValue(int codepoint)(Code) | | Gets the value associated with a given code point.
Returns null, if there is no such value.
Parameters: codepoint - the value |
hashCode | public int hashCode()(Code) | | |
isFrozen | public boolean isFrozen()(Code) | | |
put | public UnicodeMap put(int codepoint, Object value)(Code) | | Sets the codepoint value.
Parameters: codepoint - Parameters: value - this (for chaining) |
putAll | public UnicodeMap putAll(UnicodeSet codepoints, Object value)(Code) | | Adds bunch o' codepoints; otherwise like put.
Parameters: codepoints - Parameters: value - this (for chaining) |
putAll | public UnicodeMap putAll(int startCodePoint, int endCodePoint, Object value)(Code) | | Adds bunch o' codepoints; otherwise like add.
Parameters: startCodePoint - Parameters: endCodePoint - Parameters: value - this (for chaining) |
putAll | public UnicodeMap putAll(UnicodeProperty prop)(Code) | | Add all the (main) values from a Unicode property
Parameters: prop - the property to add to the map this (for chaining) |
putAll | public UnicodeMap putAll(UnicodeMap prop)(Code) | | Add all the (main) values from a Unicode property
Parameters: prop - the property to add to the map this (for chaining) |
setErrorOnReset | public void setErrorOnReset(boolean errorOnReset)(Code) | | Parameters: errorOnReset - The errorOnReset to set. |
setMissing | public UnicodeMap setMissing(Object value)(Code) | | Set the currently unmapped Unicode code points to the given value.
Parameters: value - the value to set this (for chaining) |
|
|