|
ICU 4.8.1.1
4.8.1.1
|
Iterator for all of the (string, value) pairs in a UCharsTrie. More...
#include <ucharstrie.h>
Public Member Functions | |
| Iterator (const UChar *trieUChars, int32_t maxStringLength, UErrorCode &errorCode) | |
| Iterates from the root of a UChar-serialized UCharsTrie. | |
| Iterator (const UCharsTrie &trie, int32_t maxStringLength, UErrorCode &errorCode) | |
| Iterates from the current state of the specified UCharsTrie. | |
| ~Iterator () | |
| Destructor. | |
| Iterator & | reset () |
| Resets this iterator to its initial state. | |
| UBool | hasNext () const |
| UBool | next (UErrorCode &errorCode) |
| Finds the next (string, value) pair if there is one. | |
| const UnicodeString & | getString () const |
| int32_t | getValue () const |
Iterator for all of the (string, value) pairs in a UCharsTrie.
Definition at line 268 of file ucharstrie.h.
| UCharsTrie::Iterator::Iterator | ( | const UChar * | trieUChars, |
| int32_t | maxStringLength, | ||
| UErrorCode & | errorCode | ||
| ) |
Iterates from the root of a UChar-serialized UCharsTrie.
| trieUChars | The trie UChars. |
| maxStringLength | If 0, the iterator returns full strings. Otherwise, the iterator returns strings with this maximum length. |
| errorCode | Standard ICU error code. Its input value must pass the U_SUCCESS() test, or else the function returns immediately. Check for U_FAILURE() on output or use with function chaining. (See User Guide for details.) |
| UCharsTrie::Iterator::Iterator | ( | const UCharsTrie & | trie, |
| int32_t | maxStringLength, | ||
| UErrorCode & | errorCode | ||
| ) |
Iterates from the current state of the specified UCharsTrie.
| trie | The trie whose state will be copied for iteration. |
| maxStringLength | If 0, the iterator returns full strings. Otherwise, the iterator returns strings with this maximum length. |
| errorCode | Standard ICU error code. Its input value must pass the U_SUCCESS() test, or else the function returns immediately. Check for U_FAILURE() on output or use with function chaining. (See User Guide for details.) |
Destructor.
| const UnicodeString& UCharsTrie::Iterator::getString | ( | ) | const [inline] |
Definition at line 335 of file ucharstrie.h.
| int32_t UCharsTrie::Iterator::getValue | ( | ) | const [inline] |
Definition at line 340 of file ucharstrie.h.
| UBool UCharsTrie::Iterator::hasNext | ( | ) | const |
| UBool UCharsTrie::Iterator::next | ( | UErrorCode & | errorCode | ) |
Finds the next (string, value) pair if there is one.
If the string is truncated to the maximum length and does not have a real value, then the value is set to -1. In this case, this "not a real value" is indistinguishable from a real value of -1.
| errorCode | Standard ICU error code. Its input value must pass the U_SUCCESS() test, or else the function returns immediately. Check for U_FAILURE() on output or use with function chaining. (See User Guide for details.) |
Resets this iterator to its initial state.
1.7.6.1