com.mizar.usaddress
Class CoordUtil

java.lang.Object
  extended by com.mizar.usaddress.CoordUtil

public class CoordUtil
extends java.lang.Object

Utilities to convert coordinate Strings into Double[]s and vice-versa


Constructor Summary
CoordUtil()
           
 
Method Summary
static double[] explodeString(java.lang.String coordList, java.lang.String separator)
           
static java.lang.String implodeDouble(double[] coords, java.lang.String separator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoordUtil

public CoordUtil()
Method Detail

implodeDouble

public static java.lang.String implodeDouble(double[] coords,
                                             java.lang.String separator)
Parameters:
coords - List of coordinate values (ex: { 12.34, 45.67 })
separator - value which should separate coordinates in the output string (ex: ",")
Returns:
A string composed of coord values, separated by the given separator (ex: "12.34,45.67")

explodeString

public static double[] explodeString(java.lang.String coordList,
                                     java.lang.String separator)
Parameters:
coordList - String of coordinate values (parsable to Doubles) separated by given separator (ex: "12.34,45.67")
separator - string which separates coordinate values in the input string (ex: ",")
Returns:
Array of coordinates parsed out from the given coordList String (ex: { 12.34, 45.67 })