public class LocalizedNameGenerator extends Object implements Iterator<String>, Iterable<String>
Constructor and Description |
---|
LocalizedNameGenerator(String path,
Locale locale)
Creates a new generator for the given path and locale.
|
Modifier and Type | Method and Description |
---|---|
Locale |
getCurrentLocale() |
boolean |
hasNext()
Returns true if there are more name variants to be returned, false otherwise.
|
Iterator<String> |
iterator()
So that LNG may be used with the for loop.
|
String |
next()
Returns the next localized variant.
|
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
forEach, spliterator
public LocalizedNameGenerator(String path, Locale locale)
path
- non-blank pathlocale
- non-null localepublic boolean hasNext()
public String next()
next
in interface Iterator<String>
NoSuchElementException
- if all variants have been returned.public Locale getCurrentLocale()
public void remove()
remove
in interface Iterator<String>
UnsupportedOperationException
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.