BrightSide Workbench Full Report + Source Code
org.turro.zkoss.locale.Currencies Class Reference

Static Public Member Functions

static List< Currency > getAvailable ()
 
static Currency getDefault ()
 
static Currency getDefault (Locale l)
 
static boolean hasValidCountry (Locale l)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 32 of file Currencies.java.

Member Function Documentation

◆ getAvailable()

static List<Currency> org.turro.zkoss.locale.Currencies.getAvailable ( )
static

Definition at line 34 of file Currencies.java.

34  {
35  List<Currency> list = new ArrayList<Currency>();
36  for(Locale l : Locale.getAvailableLocales()) {
37  if(hasValidCountry(l)) {
38  Currency c = Currency.getInstance(l);
39  if(!list.contains(c)) {
40  list.add(c);
41  }
42  }
43  }
44  return list;
45  }
static boolean hasValidCountry(Locale l)
Definition: Currencies.java:59
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDefault() [1/2]

static Currency org.turro.zkoss.locale.Currencies.getDefault ( )
static

Definition at line 47 of file Currencies.java.

47  {
48  Currency c = getDefault(Application.getUsedLocale());
49  return c == null ? Currency.getInstance("EUR") : c;
50  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDefault() [2/2]

static Currency org.turro.zkoss.locale.Currencies.getDefault ( Locale  l)
static

Definition at line 52 of file Currencies.java.

52  {
53  if(hasValidCountry(l)) {
54  return Currency.getInstance(l);
55  }
56  return null;
57  }
Here is the call graph for this function:

◆ hasValidCountry()

static boolean org.turro.zkoss.locale.Currencies.hasValidCountry ( Locale  l)
static

Definition at line 59 of file Currencies.java.

59  {
60  try {
61  return !Strings.isBlank(l.getISO3Country());
62  } catch(MissingResourceException mre) {
63  return false;
64  }
65  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: