public static class

AbstractResource.ResourceList

extends AbstractList<E>
implements Set<E>
java.lang.Object
   ↳ java.util.AbstractCollection<E>
     ↳ java.util.AbstractList<E>
       ↳ com.google.gwt.i18n.rebind.AbstractResource.ResourceList

Class Overview

Encapsulates an ordered set of resources to search for translations.

Summary

[Expand]
Inherited Fields
From class java.util.AbstractList
Public Constructors
AbstractResource.ResourceList()
Public Methods
boolean add(AbstractResource element)
void add(int index, AbstractResource element)
void addToKeySet(Set<String> s)
Add all keys known by this ResourceList to the specified set.
GwtLocale findLeastDerivedLocale(TreeLogger logger, GwtLocale locale)
From the list of locales matched for any resources in this resource list, choose the one that is least derived from the original search locale.
AbstractResource get(int index)
AnnotationsResource getAnnotationsResource(TreeLogger logger, String key)
Returns the first AnnotationsResource containing a specified key.
AbstractResource.ResourceEntry getEntry(String key)
Get an entry from the first resource in this list containing a match.
Collection<String> getExtension(String key)
Returns the list of extensions available for a given key.
PluralForm[] getPluralForms(String key)
Returns the list of plural forms for a given key.
String getRequiredString(String key)
Returns a translation for a key, or throw an exception.
String getRequiredStringExt(String key, String ext)
Returns a translation for a key/extension, or throw an exception.
String getString(String key)
Returns a translation for a key, or null if not found.
String getStringExt(String key, String extension)
Returns a translation for a key/extension, or null if not found.
int indexOf(Object o)
Iterator<AbstractResource> iterator()
Set<String> keySet()
Returns set of keys present across all resources.
int lastIndexOf(Object o)
AbstractResource remove(int index)
void setPluralForms(String key, PluralForm[] forms)
Set the plural forms associated with a given message.
int size()
[Expand]
Inherited Methods
From class java.util.AbstractList
From class java.util.AbstractCollection
From class java.lang.Object
From interface java.lang.Iterable
From interface java.util.Collection
From interface java.util.List
From interface java.util.Set

Public Constructors

public AbstractResource.ResourceList ()

Public Methods

public boolean add (AbstractResource element)

public void add (int index, AbstractResource element)

public void addToKeySet (Set<String> s)

Add all keys known by this ResourceList to the specified set.

Parameters
s set to add keys to

public GwtLocale findLeastDerivedLocale (TreeLogger logger, GwtLocale locale)

From the list of locales matched for any resources in this resource list, choose the one that is least derived from the original search locale.

Parameters
logger logger to use
locale originally requested locale
Returns
  • least derived matched locale

public AbstractResource get (int index)

public AnnotationsResource getAnnotationsResource (TreeLogger logger, String key)

Returns the first AnnotationsResource containing a specified key.

Returns
  • first AnnotationsResource containing key, or null if none

public AbstractResource.ResourceEntry getEntry (String key)

Get an entry from the first resource in this list containing a match.

Returns
  • a ResourceEntry instance

public Collection<String> getExtension (String key)

Returns the list of extensions available for a given key.

Returns
  • collection of extensions for the given key

public PluralForm[] getPluralForms (String key)

Returns the list of plural forms for a given key.

Returns
  • array of plural forms.

public String getRequiredString (String key)

Returns a translation for a key, or throw an exception.

Returns
  • translated string for key

public String getRequiredStringExt (String key, String ext)

Returns a translation for a key/extension, or throw an exception.

Parameters
ext key extension, null if none
Returns
  • translated string for key

public String getString (String key)

Returns a translation for a key, or null if not found.

Returns
  • translated string for key

public String getStringExt (String key, String extension)

Returns a translation for a key/extension, or null if not found.

Parameters
extension key extension, null if none
Returns
  • translated string for key

public int indexOf (Object o)

public Iterator<AbstractResource> iterator ()

public Set<String> keySet ()

Returns set of keys present across all resources.

public int lastIndexOf (Object o)

public AbstractResource remove (int index)

public void setPluralForms (String key, PluralForm[] forms)

Set the plural forms associated with a given message.

public int size ()