com.opensymphony.xwork2

## Class DefaultLocaleProvider

- java.lang.Object
- - com.opensymphony.xwork2.DefaultLocaleProvider

- All Implemented Interfaces:
    LocaleProvider

      public class DefaultLocaleProvider
      extends Object
      implements LocaleProvider

  Default implementation of `LocaleProvider`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultLocaleProvider()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Locale` | `getLocale()` Gets the provided locale.
    `boolean` | `isValidLocale(Locale locale)` Validates if provided `Locale` is value
    `boolean` | `isValidLocaleString(String localeStr)` Validates if provided string is a valid `Locale`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultLocaleProvider

          public DefaultLocaleProvider()

  - ### Method Detail

    - #### getLocale

          public Locale getLocale()

      Description copied from interface: `LocaleProvider`
      Gets the provided locale.
      Specified by:
        `getLocale` in interface `LocaleProvider`
      Returns:
        the locale.

    - #### isValidLocaleString

          public boolean isValidLocaleString(String localeStr)

      Description copied from interface: `LocaleProvider`
      Validates if provided string is a valid `Locale`
      Specified by:
        `isValidLocaleString` in interface `LocaleProvider`
      Parameters:
        `localeStr` - a String representing locale, e.g. en_EN
      Returns:
        true if valid

    - #### isValidLocale

          public boolean isValidLocale(Locale locale)

      Description copied from interface: `LocaleProvider`
      Validates if provided `Locale` is value
      Specified by:
        `isValidLocale` in interface `LocaleProvider`
      Parameters:
        `locale` - instance of `Locale` to validate
      Returns:
        true if valid

Copyright © 2000–2021 Apache Software Foundation. All rights reserved.