Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.factual.driver;
 
Represents a geographical point.

Author(s):
brandon
public class Point {
	  private final double latitude;
	  private final double longitude;

  
Constructs a geographic Point representation.

Parameters:
latitude the latitude of the point.
longitude the longitude of the point.
	  public Point(double latitudedouble longitude) {
	    this. = latitude;
	    this. = longitude;
	  }

  
View this point as a json string representation

Returns:
a json string representation of this Point
	  public String toJsonStr() {
	    return JsonUtil.toJsonStr(toJsonObject());
	  }

  
View this Point as an object representation that can be serialized as json

Returns:
an object representation of this point that can be serialized as json
	  @SuppressWarnings({ "unchecked""rawtypes""serial" })
	  private Object toJsonObject() {
		  return new HashMap() {
			{
				put(.new double[]{});
			}
		  };
	  }
	  
	  public String toString() {
		  return toJsonStr();
	  }
New to GrepCode? Check out our FAQ X