Class for enabling iteration over UResourceBundle objects.
Example of use:
ICUResourceBundleIterator iterator = resB.getIterator();
ICUResourceBundle temp;
while (iterator.hasNext()) {
temp = iterator.next();
int type = temp.getType();
switch(type){
case UResourceBundle.STRING:
str = temp.getString();
break;
case UResourceBundle.INT:
integer = temp.getInt();
break;
.....
}
// do something interesting with data collected
}
| Modifier and Type | Field and Description |
|---|---|
| private UResourceBundle | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | UResourceBundleIterator(UResourceBundle
The resource bundle to iterate over bndl)Construct a resource bundle iterator for the given resource bundle |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if there are more elements, false if there is no more elementsChecks whether the given resource has another element to iterate over. |
| public UResourceBundle | Returns: the UResourceBundle objectReturns the next element of this iterator if this iterator object has at least one more element to provide |
| public String | Returns: the UResourceBundle objectReturns the next String of this iterator if this iterator object has at least one more element to provide |
| public void |
| bundle | back to summary |
|---|---|
| private UResourceBundle bundle | |
| index | back to summary |
|---|---|
| private int index | |
| size | back to summary |
|---|---|
| private int size | |
| UResourceBundleIterator | back to summary |
|---|---|
| public UResourceBundleIterator(UResourceBundle bndl) Construct a resource bundle iterator for the given resource bundle
| |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Checks whether the given resource has another element to iterate over.
| |
| next | back to summary |
|---|---|
| public UResourceBundle next() throws NoSuchElementException Returns the next element of this iterator if this iterator object has at least one more element to provide
| |
| nextString | back to summary |
|---|---|
| public String nextString() throws NoSuchElementException, UResourceTypeMismatchException Returns the next String of this iterator if this iterator object has at least one more element to provide
| |
| reset | back to summary |
|---|---|
| public void reset() Resets the internal context of a resource so that iteration starts from the first element.
| |