org.apache.tapestry.util
Class LocalizedNameGenerator

java.lang.Object
  extended by org.apache.tapestry.util.LocalizedNameGenerator

public class LocalizedNameGenerator
extends Object

Used in a wide variety of resource searches. Generates a series of name variations from a base name, a Locale and an optional suffix.

Since:
3.0
Version:
$Id: LocalizedNameGenerator.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Constructor Summary
LocalizedNameGenerator(String baseName, Locale locale, String suffix)
           
 
Method Summary
 Locale getCurrentLocale()
           
 boolean more()
          Returns true if there are more name variants to be returned, false otherwise.
 String next()
          Returns the next localized variant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalizedNameGenerator

public LocalizedNameGenerator(String baseName,
                              Locale locale,
                              String suffix)
Method Detail

more

public boolean more()
Returns true if there are more name variants to be returned, false otherwise.


next

public String next()
Returns the next localized variant.

Throws:
NoSuchElementException - if all variants have been returned.

getCurrentLocale

public Locale getCurrentLocale()