Class DummyLocalizable
java.lang.Object
org.apache.commons.math4.exception.util.DummyLocalizable
- All Implemented Interfaces:
java.io.Serializable,Localizable
public class DummyLocalizable extends java.lang.Object implements Localizable
Dummy implementation of the
Localizable interface, without localization.- Since:
- 2.2
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description DummyLocalizable(java.lang.String source)Simple constructor. -
Method Summary
Modifier and Type Method Description java.lang.StringgetLocalizedString(java.util.Locale locale)Gets the localized string.java.lang.StringgetSourceString()Gets the source (non-localized) string.java.lang.StringtoString()
-
Constructor Details
-
DummyLocalizable
public DummyLocalizable(java.lang.String source)Simple constructor.- Parameters:
source- source text
-
-
Method Details
-
getSourceString
public java.lang.String getSourceString()Gets the source (non-localized) string.- Specified by:
getSourceStringin interfaceLocalizable- Returns:
- the source string.
-
getLocalizedString
public java.lang.String getLocalizedString(java.util.Locale locale)Gets the localized string.- Specified by:
getLocalizedStringin interfaceLocalizable- Parameters:
locale- locale into which to get the string.- Returns:
- the localized string or the source string if no localized version is available.
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-