public class LocalizedNameGenerator extends java.lang.Object implements java.util.Iterator<java.lang.String>, java.lang.Iterable<java.lang.String>
Constructor and Description |
---|
LocalizedNameGenerator(java.lang.String path,
java.util.Locale locale)
Creates a new generator for the given path and locale.
|
Modifier and Type | Method and Description |
---|---|
java.util.Locale |
getCurrentLocale() |
boolean |
hasNext()
Returns true if there are more name variants to be returned, false otherwise.
|
java.util.Iterator<java.lang.String> |
iterator()
So that LNG may be used with the for loop.
|
java.lang.String |
next()
Returns the next localized variant.
|
void |
remove() |
public LocalizedNameGenerator(java.lang.String path, java.util.Locale locale)
path
- non-blank pathlocale
- non-null localepublic boolean hasNext()
hasNext
in interface java.util.Iterator<java.lang.String>
public java.lang.String next()
next
in interface java.util.Iterator<java.lang.String>
java.util.NoSuchElementException
- if all variants have been returned.public java.util.Locale getCurrentLocale()
public void remove()
remove
in interface java.util.Iterator<java.lang.String>
java.lang.UnsupportedOperationException
public java.util.Iterator<java.lang.String> iterator()
iterator
in interface java.lang.Iterable<java.lang.String>
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.