Package org.apache.fulcrum.localization
Class LocaleTokenizer
java.lang.Object
org.apache.fulcrum.localization.LocaleTokenizer
Parses the HTTP
Accept-Language header as per section
14.4 of RFC 2068 (HTTP 1.1 header field definitions).- Version:
- $Id$
- Author:
- Daniel Rall
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classStruct representing an element of the HTTPAccept-Languageheader. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final FloatThe default quality value for anAcceptLanguageobject. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
DEFAULT_QUALITY
The default quality value for anAcceptLanguageobject.
-
-
Constructor Details
-
LocaleTokenizer
Parses theAccept-Languageheader.- Parameters:
header- TheAccept-Languageheader (i.e.en, es;q=0.8, zh-TW;q=0.1).
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
Creates aLocalefrom the next element of theAccept-Languageheader.- Specified by:
nextin interfaceIterator<Object>- Returns:
- The next highest-rated
Locale. - Throws:
NoSuchElementException- No more locales.
-
remove
public final void remove()Not implemented.
-