Java Code Examples for com.ibm.icu.lang.UProperty#UNDEFINED
The following examples show how to use
com.ibm.icu.lang.UProperty#UNDEFINED .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UPropertyAliases.java From fitnotifications with Apache License 2.0 | 5 votes |
private int getPropertyOrValueEnum(int bytesTrieOffset, CharSequence alias) { BytesTrie trie=new BytesTrie(bytesTries, bytesTrieOffset); if(containsName(trie, alias)) { return trie.getValue(); } else { return UProperty.UNDEFINED; } }
Example 2
Source File: UPropertyAliases.java From fitnotifications with Apache License 2.0 | 5 votes |
/** * Returns a value enum given a property enum and one of its value names. Does not throw. * @return value enum, or UProperty.UNDEFINED if not defined for that property */ public int getPropertyValueEnumNoThrow(int property, CharSequence alias) { int valueMapIndex=findProperty(property); if(valueMapIndex==0) { return UProperty.UNDEFINED; } valueMapIndex=valueMaps[valueMapIndex+1]; if(valueMapIndex==0) { return UProperty.UNDEFINED; } // valueMapIndex is the start of the property's valueMap, // where the first word is the BytesTrie offset. return getPropertyOrValueEnum(valueMaps[valueMapIndex], alias); }
Example 3
Source File: UPropertyAliases.java From trekarta with GNU General Public License v3.0 | 5 votes |
private int getPropertyOrValueEnum(int bytesTrieOffset, CharSequence alias) { BytesTrie trie=new BytesTrie(bytesTries, bytesTrieOffset); if(containsName(trie, alias)) { return trie.getValue(); } else { return UProperty.UNDEFINED; } }
Example 4
Source File: UPropertyAliases.java From trekarta with GNU General Public License v3.0 | 5 votes |
/** * Returns a value enum given a property enum and one of its value names. Does not throw. * @return value enum, or UProperty.UNDEFINED if not defined for that property */ public int getPropertyValueEnumNoThrow(int property, CharSequence alias) { int valueMapIndex=findProperty(property); if(valueMapIndex==0) { return UProperty.UNDEFINED; } valueMapIndex=valueMaps[valueMapIndex+1]; if(valueMapIndex==0) { return UProperty.UNDEFINED; } // valueMapIndex is the start of the property's valueMap, // where the first word is the BytesTrie offset. return getPropertyOrValueEnum(valueMaps[valueMapIndex], alias); }