Package org.apache.tapestry5.ioc.util
Class LocalizedNameGenerator
-
- org.apache.tapestry5.ioc.util.LocalizedNameGenerator
-
- All Implemented Interfaces:
<>
,<>
public class LocalizedNameGenerator extends implements <>, <>
Generates name variations for a given file name or path and a locale. The name variations are provided in most-specific to least-specific order, so for a path of "Base.ext" and a Locale of "en_US", the generated names would be "Base_en_US.ext", "Base_en.ext", "Base.ext". Implements Iterable, so a LocalizedNameGenerator may be used directly in a for loop. This class is not threadsafe.- Since:
- 5.3
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description getCurrentLocale()
boolean
hasNext()
Returns true if there are more name variants to be returned, false otherwise.<>
iterator()
So that LNG may be used with the for loop.next()
Returns the next localized variant.void
remove()
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
Returns true if there are more name variants to be returned, false otherwise.- Specified by:
in interface
<>
-
next
public next()
Returns the next localized variant.- Specified by:
in interface
<>
- Throws:
- if all variants have been returned.
-
getCurrentLocale
public getCurrentLocale()
-
remove
public void remove()
- Specified by:
in interface
<>
- Throws:
-
iterator
public <> iterator()
So that LNG may be used with the for loop.- Specified by:
in interface
<>
-
-