public class BaseUnitFormatter
extends SimpleUnitFormat
GeoTools' unit formatters should be implemented by calling the provided constructors.
Constructor and Description |
---|
BaseUnitFormatter(List<UnitDefinition> unitDefinitions)
Create a new
BaseUnitFormatter instance, initialized with provided the unit
definitions. |
BaseUnitFormatter(UnitDefinition... unitDefinitions)
Create a new
BaseUnitFormatter instance, initialized with provided the unit
definitions. |
Modifier and Type | Method and Description |
---|---|
protected void |
addUnit(Unit<?> unit)
Defaults to being a no-op, subclasses can override
|
Map<String,Unit<?>> |
getSymbolToUnitMap() |
Map<Unit<?>,String> |
getUnitToSymbolMap() |
void |
label(Unit<?> unit,
String label) |
format, getInstance, getInstance, isAllASCII, parseObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
format, format, parse, parse
public BaseUnitFormatter(UnitDefinition... unitDefinitions)
BaseUnitFormatter
instance, initialized with provided the unit
definitions.unitDefinitions
- unit definitions used to initialize this new instancepublic BaseUnitFormatter(List<UnitDefinition> unitDefinitions)
BaseUnitFormatter
instance, initialized with provided the unit
definitions.unitDefinitions
- a list of unit definitions used to initialize this new instancepublic Map<Unit<?>,String> getUnitToSymbolMap()
public Map<String,Unit<?>> getSymbolToUnitMap()
public void label(Unit<?> unit, String label)
label
in interface UnitFormat
protected void addUnit(Unit<?> unit)
Copyright © 1996–2023 Geotools. All rights reserved.