# Class Coord

java.lang.Object
com.codename1.maps.Coord

Direct Known Subclasses:
  `PointLayer`

public class Coord extends Object
This class declares a coordinate point on a map.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Coord(double latitude, double longitude)`
  Creates a isProjected Coord
  `Coord(double latitude, double longitude, boolean projected)`
  a Constructor with getLatitude, getLongitude
  `Coord(Coord toClone)`
  Copy Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object other)`
  `double`
  `getLatitude()`
  Gets the Coord Latitude
  `double`
  `getLongitude()`
  Gets the Coord Longitude.
  `int`
  `hashCode()`
  `final boolean`
  `isProjected()`
  Returns true if this is a projected Coordinate
  `void`
  `setLatitude(double latitude)`
  Sets the Coord Latitude.
  `void`
  `setLongitude(double longitude)`
  Sets the Coord Longitude.
  `void`
  `setProjected(boolean projected)`
  Sets Coord projected
  `String`
  `toString()`
  `Coord`
  `translate(double latitude, double longitude)`
  Create a new Coord object which is translated with the given coordinates
  `Coord`
  `translate(Coord coordinates)`
  Create a new Coord object which is translated with the given coordinates

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Coord

    public Coord(double latitude, double longitude)

    Creates a isProjected Coord

    ###### Parameters

    - `latitude`: the getLatitude of this Coordinate

    - `longitude`: the getLongitude of this Coordinate

  - ### Coord

    public Coord(double latitude, double longitude, boolean projected)

    a Constructor with getLatitude, getLongitude

    ###### Parameters

    - `latitude`: the Coordinate getLatitude

    - `longitude`: the Coordinate getLongitude

    - `projected`: declares if this is a isProjected Coordinate

  - ### Coord

    public Coord(Coord toClone)

    Copy Constructor

    ###### Parameters

    - `toClone`: to copy

- ## Method Details

  - ### getLongitude

    public double getLongitude()

    Gets the Coord Longitude.

    ###### Returns

    the Coord Longitude

  - ### setLongitude

    public void setLongitude(double longitude)
    Sets the Coord Longitude.

  - ### getLatitude

    public double getLatitude()

    Gets the Coord Latitude

    ###### Returns

    the Coord Latitude

  - ### setLatitude

    public void setLatitude(double latitude)
    Sets the Coord Latitude.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### translate

    public Coord translate(double latitude, double longitude)

    Create a new Coord object which is translated with the given coordinates

    ###### Parameters

    - `latitude`: translate current latitude with this latitude

    - `longitude`: translate current longitude with this longitude

    ###### Returns

    a new translated Coord object

  - ### translate

    public Coord translate(Coord coordinates)

    Create a new Coord object which is translated with the given coordinates

    ###### Parameters

    - `coordinates`: translate current Coord with the given coordinates

    ###### Returns

    a new translated Coord object

  - ### equals

    public boolean equals(Object other)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### isProjected

    public final boolean isProjected()

    Returns true if this is a projected Coordinate

    ###### Returns

    true if projected

  - ### setProjected

    public void setProjected(boolean projected)

    Sets Coord projected

    ###### Parameters

    - `projected`: flag