Interface Localized
- All Known Implementing Classes:
AngleFormat, AssociationRoleBuilder, AttributeTypeBuilder, Canvas, CascadedStoreEvent, CharacteristicTypeBuilder, CloseEvent, CompoundFormat, CoordinateFormat, CoordinateOperationContext, CoverageCanvas, CoverageExplorer, DataStore, EPSGDataAccess, EPSGFactory, FeatureFormat, FeatureTypeBuilder, Formatter, GDALStore, GeoHeifStore, GeoTiffStore, GridSliceSelector, IdentifiedObjectSet, ImagePropertyExplorer, LandsatStore, LocationFormat, LogViewer, MapCanvas, MapCanvasAWT, MarshalContext, MetadataSummary, NetcdfStore, OptionalInstallations, ParameterFormat, PlanarCanvas, PropertyTypeBuilder, RangeFormat, ResourceExplorer, ResourcesDownloader, SimpleFeatureStore, SQLStore, StatisticsFormat, StatusBar, StoreEvent, StoreListeners, Symbols, TabularFormat, TileMatrixSetFormat, TileMatrixSetPane, TileReadEvent, TreeTableFormat, TypeBuilder, UnitFormat, WarningEvent, Warnings, Widget, WKTFormat
public interface Localized
Interface of classes for which each instance is configured for a particular locale.
Implementations of
Localized are often parsers or formatters configured for
a locale specified at construction time.
Localized exception messages
When a class implementing thisLocalized interface throws an exception,
the error message returned by Throwable.getLocalizedMessage() will often
be in the locale returned by getLocale() instead of the default locale.
This policy is applied on a best effort basis only.- Since:
- 0.3
-
Method Summary
Modifier and TypeMethodDescriptionReturns the locale of the implemented service.
-
Method Details
-
getLocale
Locale getLocale()Returns the locale of the implemented service. Some implementations may returnnullif no locale is explicitly defined. The meaning of null locale is implementation-dependent, but typical interpretations are:- A synonymous of the system default locale.
- A synonymous of
Locale.ROOTfor an "unlocalized" service. For example, the service may format numbers usingDouble.toString(double)instead ofNumberFormat.
- Returns:
- the locale, or
nullif not explicitly defined.
-