ezvcard.util
Class GeoUri.Builder

java.lang.Object
  extended by ezvcard.util.GeoUri.Builder
Enclosing class:
GeoUri

public static class GeoUri.Builder
extends Object

Builder class for GeoUri.

Author:
Michael Angstadt

Constructor Summary
GeoUri.Builder(Double coordA, Double coordB)
          Creates a new GeoUri builder.
GeoUri.Builder(GeoUri original)
          Creates a new GeoUri builder.
 
Method Summary
 GeoUri build()
          Builds the final GeoUri object.
 GeoUri.Builder coordA(Double coordA)
          Sets the first coordinate (latitude).
 GeoUri.Builder coordB(Double coordB)
          Sets the second coordinate (longitude).
 GeoUri.Builder coordC(Double coordC)
          Sets the third coordinate (altitude).
 GeoUri.Builder crs(String crs)
          Sets the coordinate reference system.
 GeoUri.Builder parameter(String name, String value)
          Adds a parameter.
 GeoUri.Builder uncertainty(Double uncertainty)
          Sets the uncertainty (how accurate the coordinates are).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoUri.Builder

public GeoUri.Builder(Double coordA,
                      Double coordB)
Creates a new GeoUri builder.

Parameters:
coordA - the first coordinate (i.e. latitude)
coordB - the second coordinate (i.e. longitude)

GeoUri.Builder

public GeoUri.Builder(GeoUri original)
Creates a new GeoUri builder.

Parameters:
original - the GeoUri object to copy from
Method Detail

coordA

public GeoUri.Builder coordA(Double coordA)
Sets the first coordinate (latitude).

Parameters:
coordA - the first coordinate
Returns:
this

coordB

public GeoUri.Builder coordB(Double coordB)
Sets the second coordinate (longitude).

Parameters:
coordB - the second coordinate
Returns:
this

coordC

public GeoUri.Builder coordC(Double coordC)
Sets the third coordinate (altitude).

Parameters:
coordC - the third coordinate or null to remove
Returns:
this

crs

public GeoUri.Builder crs(String crs)
Sets the coordinate reference system.

Parameters:
crs - the coordinate reference system (can only contain letters, numbers, and hyphens) or null to use the default (WGS-84)
Returns:
this
Throws:
IllegalArgumentException - if the CRS name contains invalid characters

uncertainty

public GeoUri.Builder uncertainty(Double uncertainty)
Sets the uncertainty (how accurate the coordinates are).

Parameters:
uncertainty - the uncertainty (in meters) or null to remove
Returns:
this

parameter

public GeoUri.Builder parameter(String name,
                                String value)
Adds a parameter.

Parameters:
name - the parameter name (can only contain letters, numbers, and hyphens)
value - the parameter value or null to remove the parameter
Returns:
this
Throws:
IllegalArgumentException - if the parameter name contains invalid characters

build

public GeoUri build()
Builds the final GeoUri object.

Returns:
the object


Copyright © 2012-2014 Michael Angstadt. All Rights Reserved.