Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.olafpanz.translationtable
Class LocaleDef

    java.lang.Object
      de.olafpanz.translationtable.LocaleDef

All Implemented Interfaces:
  java.lang.Comparable<LocaleDef>

    final class LocaleDef

extends java.lang.Object
implements java.lang.Comparable<LocaleDef>

Defines a locale for the TranslationDocument

Author:
  Olaf

Field Summary
`private boolean` | `isMaster` Marks the master locale of current table
`private java.util.Locale` | `locale` The locale of this definition
`private java.util.Locale` | `templateLocale` Use translation from this locale, if no value exists.

Constructor Summary
`LocaleDef(java.util.Locale locale, java.util.Locale templateLocale, boolean isMaster)` Create new locale definition

Method Summary
`private int` | `cmp(java.lang.String s0, java.lang.String s1)` Compare 2 strings allowing null.
`int` | `compareTo(LocaleDef def)`
`java.util.Locale` | `getLocale()`
`java.util.Locale` | `getTemplateLocale()`
`boolean` | `isDefault()`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### locale

    private final java.util.Locale locale

  The locale of this definition

### templateLocale

    private final java.util.Locale templateLocale

  Use translation from this locale, if no value exists.

### isMaster

    private final boolean isMaster

  Marks the master locale of current table

Constructor Detail

### LocaleDef

    public LocaleDef(java.util.Locale locale,
                     java.util.Locale templateLocale,
                     boolean isMaster)

  Create new locale definition

  Parameters:
    `locale` - The locale of this definition
    `templateLocale` - Use translation from this locale, if no value exists.
    `isMaster` - Marks the master locale of current table

Method Detail

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`
  See Also:
    `Object.toString()`

### getLocale

    public java.util.Locale getLocale()

  Returns:
    The locale of this definition

### getTemplateLocale

    public java.util.Locale getTemplateLocale()

  Returns:
    Use translation from this locale, if no value exists.

### isDefault

    public boolean isDefault()

  Returns:
    Marks the master locale of current table

### compareTo

    public int compareTo(LocaleDef def)

  Specified by:
    `compareTo` in interface `java.lang.Comparable<LocaleDef>`
  See Also:
    `Comparable.compareTo(java.lang.Object)`

### cmp

    private final int cmp(java.lang.String s0,
                          java.lang.String s1)

  Compare 2 strings allowing null.

  Parameters:
    `s0` - First string
    `s1` - Second string
  Returns:
    Handles null as smaller as not null

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD