org.softsmithy.lib.text
Class Localizables

java.lang.Object
  extended by org.softsmithy.lib.text.Localizables

public class Localizables
extends Object

A utility class for Localizables.

Author:
puce
See Also:
Localizable, Localizer, LocalizedCollator, Locale

Method Summary
static void sort(List<? extends Localizable> localizables)
          Sorts a list of Localizables in the natural, locale-sensitive order of their Localizable.getDisplayString(java.util.Locale)-representation (uses the default locale).
static void sort(Locale inLocale, List<? extends Localizable> localizables)
          Sorts a list of Localizables in the natural, locale-sensitive order of their Localizable.getDisplayString(java.util.Locale)-representation.
static void sort(Locale inLocale, Localizable... localizables)
          Sorts an array of Localizables in the natural, locale-sensitive order of their Localizable.getDisplayString(java.util.Locale)-representation.
static void sort(Localizable... localizables)
          Sorts an array of Localizables in the natural, locale-sensitive order of their Localizable.getDisplayString(java.util.Locale)-representation (uses the default locale).
static void sort(LocalizedCollator collator, List<? extends Localizable> localizables)
          Sorts a list of Localizables in the natural, locale-sensitive order of their Localizable.getDisplayString(java.util.Locale)-representation as specified by the collator.
static void sort(LocalizedCollator collator, Localizable... localizables)
          Sorts an array of Localizables in the natural, locale-sensitive order of their Localizable.getDisplayString(java.util.Locale)-representation as specified by the collator.
static
<T> void
sort(Localizer<? super T> localizer, List<T> list)
          Sorts a list of objects in the natural, locale-sensitive order of their Localizer.getDisplayString(java.lang.Object, java.util.Locale)-representation (uses the default locale).
static
<T> void
sort(Localizer<? super T> localizer, Locale inLocale, List<T> list)
          Sorts a list of objects in the natural, locale-sensitive order of their Localizer.getDisplayString(java.lang.Object, java.util.Locale)-representation.
static
<T> void
sort(Localizer<? super T> localizer, Locale inLocale, T... objects)
          Sorts an array of objects in the natural, locale-sensitive order of their Localizer.getDisplayString(java.lang.Object, java.util.Locale)-representation.
static
<T> void
sort(Localizer<? super T> localizer, LocalizedCollator collator, List<T> list)
          Sorts a list of objects in the natural, locale-sensitive order of their Localizer.getDisplayString(java.lang.Object, java.util.Locale)-representation as specified by the collator.
static
<T> void
sort(Localizer<? super T> localizer, LocalizedCollator collator, T... objects)
          Sorts an array of objects in the natural, locale-sensitive order of their Localizer.getDisplayString(java.lang.Object, java.util.Locale)-representation as specified by the collator.
static
<T> void
sort(Localizer<? super T> localizer, T... array)
          Sorts an array of objects in the natural, locale-sensitive order of their Localizer.getDisplayString(java.lang.Object, java.util.Locale)-representation (uses the default locale).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

sort

public static void sort(Locale inLocale,
                        Localizable... localizables)
Sorts an array of Localizables in the natural, locale-sensitive order of their Localizable.getDisplayString(java.util.Locale)-representation.

Parameters:
inLocale - selects the localized display strings and the natural, locale-sensitive order for this locale
localizables - the localizables to sort

sort

public static void sort(LocalizedCollator collator,
                        Localizable... localizables)
Sorts an array of Localizables in the natural, locale-sensitive order of their Localizable.getDisplayString(java.util.Locale)-representation as specified by the collator.

Parameters:
collator - selects the localized display strings and specifies the natural, locale-sensitive order for this locale
localizables - the localizables to sort

sort

public static void sort(Localizable... localizables)
Sorts an array of Localizables in the natural, locale-sensitive order of their Localizable.getDisplayString(java.util.Locale)-representation (uses the default locale).

Parameters:
localizables - the localizables to sort
See Also:
Locale.getDefault()

sort

public static <T> void sort(Localizer<? super T> localizer,
                            Locale inLocale,
                            T... objects)
Sorts an array of objects in the natural, locale-sensitive order of their Localizer.getDisplayString(java.lang.Object, java.util.Locale)-representation.

Parameters:
localizer - gets the localized display strings of the objects
inLocale - selects the localized display strings and the natural, locale-sensitive order for this locale
objects - the objects to sort

sort

public static <T> void sort(Localizer<? super T> localizer,
                            LocalizedCollator collator,
                            T... objects)
Sorts an array of objects in the natural, locale-sensitive order of their Localizer.getDisplayString(java.lang.Object, java.util.Locale)-representation as specified by the collator.

Parameters:
localizer - gets the localized display strings of the objects
collator - selects the localized display strings and specifies the natural, locale-sensitive order for this locale
objects - the objects to sort

sort

public static <T> void sort(Localizer<? super T> localizer,
                            T... array)
Sorts an array of objects in the natural, locale-sensitive order of their Localizer.getDisplayString(java.lang.Object, java.util.Locale)-representation (uses the default locale).

Parameters:
localizer - gets the localized display strings of the objects
objects - the objects to sort

sort

public static void sort(Locale inLocale,
                        List<? extends Localizable> localizables)
Sorts a list of Localizables in the natural, locale-sensitive order of their Localizable.getDisplayString(java.util.Locale)-representation.

Parameters:
inLocale - selects the localized display strings and the natural, locale-sensitive order for this locale
localizables - the localizables to sort

sort

public static void sort(LocalizedCollator collator,
                        List<? extends Localizable> localizables)
Sorts a list of Localizables in the natural, locale-sensitive order of their Localizable.getDisplayString(java.util.Locale)-representation as specified by the collator.

Parameters:
collator - selects the localized display strings and specifies the natural, locale-sensitive order for this locale
localizables - the localizables to sort

sort

public static void sort(List<? extends Localizable> localizables)
Sorts a list of Localizables in the natural, locale-sensitive order of their Localizable.getDisplayString(java.util.Locale)-representation (uses the default locale).

Parameters:
localizables - the localizables to sort
See Also:
Locale.getDefault()

sort

public static <T> void sort(Localizer<? super T> localizer,
                            Locale inLocale,
                            List<T> list)
Sorts a list of objects in the natural, locale-sensitive order of their Localizer.getDisplayString(java.lang.Object, java.util.Locale)-representation.

Parameters:
localizer - gets the localized display strings of the objects
inLocale - selects the localized display strings and the natural, locale-sensitive order for this locale
list - the objects to sort

sort

public static <T> void sort(Localizer<? super T> localizer,
                            LocalizedCollator collator,
                            List<T> list)
Sorts a list of objects in the natural, locale-sensitive order of their Localizer.getDisplayString(java.lang.Object, java.util.Locale)-representation as specified by the collator.

Parameters:
localizer - gets the localized display strings of the objects
collator - selects the localized display strings and specifies the natural, locale-sensitive order for this locale
list - the objects to sort

sort

public static <T> void sort(Localizer<? super T> localizer,
                            List<T> list)
Sorts a list of objects in the natural, locale-sensitive order of their Localizer.getDisplayString(java.lang.Object, java.util.Locale)-representation (uses the default locale).

Parameters:
localizer - gets the localized display strings of the objects
list - the objects to sort
See Also:
Locale.getDefault()


Copyright © 2002-2011 SoftSmithy. All Rights Reserved.