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 class
Struct representing an element of the HTTPAccept-Language
header. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Float
The default quality value for anAcceptLanguage
object. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
DEFAULT_QUALITY
The default quality value for anAcceptLanguage
object.
-
-
Constructor Details
-
LocaleTokenizer
Parses theAccept-Language
header.- Parameters:
header
- TheAccept-Language
header (i.e.en, es;q=0.8, zh-TW;q=0.1
).
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
Creates aLocale
from the next element of theAccept-Language
header.- Specified by:
next
in interfaceIterator<Object>
- Returns:
- The next highest-rated
Locale
. - Throws:
NoSuchElementException
- No more locales.
-
remove
public final void remove()Not implemented.
-