org.deegree.geometry.io
Class DecimalCoordinateFormatter

java.lang.Object
  extended by org.deegree.geometry.io.DecimalCoordinateFormatter
All Implemented Interfaces:
CoordinateFormatter

public class DecimalCoordinateFormatter
extends java.lang.Object
implements CoordinateFormatter

CoordinateFormatter based on DecimalFormat.

Version:
$Revision: 21416 $, $Date: 2009-12-14 13:46:56 +0100 (Mo, 14. Dez 2009) $
Author:
Markus Schneider, last edited by: $Author: sthomas $

Constructor Summary
DecimalCoordinateFormatter(java.text.DecimalFormat decimalFormat)
          Creates a new DecimalCoordinateFormatter instance from the given DecimalFormat.
DecimalCoordinateFormatter(int decimalPlaces)
          Creates a new DecimalCoordinateFormatter instance that uses the specified number of decimal places.
 
Method Summary
 java.lang.String format(double number)
          Returns the formatted string representation of the given ordinate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecimalCoordinateFormatter

public DecimalCoordinateFormatter(int decimalPlaces)
Creates a new DecimalCoordinateFormatter instance that uses the specified number of decimal places.

Parameters:
decimalPlaces - number of decimal places

DecimalCoordinateFormatter

public DecimalCoordinateFormatter(java.text.DecimalFormat decimalFormat)
Creates a new DecimalCoordinateFormatter instance from the given DecimalFormat.

Parameters:
decimalFormat - decimalFormat to use for formatting, must not be null
Method Detail

format

public java.lang.String format(double number)
Description copied from interface: CoordinateFormatter
Returns the formatted string representation of the given ordinate.

Specified by:
format in interface CoordinateFormatter
Parameters:
number - ordinate to be formatted
Returns:
the formatted string, never null


Copyright © 2011. All Rights Reserved.