Class PolygonResult

java.lang.Object
com.irurueta.navigation.geodesic.PolygonResult

public class PolygonResult extends Object
A container for the results from PolygonArea.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private double
    The area of the polygon (meters2).
    private int
    The number of vertices in the polygon.
    private double
    The perimeter of the polygon or the length of the polyline (meters).
  • Constructor Summary

    Constructors
    Constructor
    Description
    PolygonResult(int num, double perimeter, double area)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Gets the area of the polygon (meters2).
    int
    Gets the number of vertices in the polygon.
    double
    Gets the perimeter of the polygon or the length of the polyline (meters).
    void
    setArea(double area)
    Sets the area of the polygon (meters2).
    void
    setNum(int num)
    Sets the number of vertices in the polygon.
    void
    setPerimeter(double perimeter)
    Sets the perimeter of the polygon or the length of the polyline (meters).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • num

      private int num
      The number of vertices in the polygon.
    • perimeter

      private double perimeter
      The perimeter of the polygon or the length of the polyline (meters).
    • area

      private double area
      The area of the polygon (meters2).
  • Constructor Details

    • PolygonResult

      public PolygonResult(int num, double perimeter, double area)
      Constructor.
      Parameters:
      num - the number of vertices in the polygon.
      perimeter - the perimeter of the polygon or the length of the polyline (meters).
      area - the area of the polygon (meters2).
  • Method Details

    • getNum

      public int getNum()
      Gets the number of vertices in the polygon.
      Returns:
      number of vertices in the polygon.
    • setNum

      public void setNum(int num)
      Sets the number of vertices in the polygon.
      Parameters:
      num - number of vertices in the polygon.
    • getPerimeter

      public double getPerimeter()
      Gets the perimeter of the polygon or the length of the polyline (meters).
      Returns:
      the perimeter of the polygon or the length of the polyline.
    • setPerimeter

      public void setPerimeter(double perimeter)
      Sets the perimeter of the polygon or the length of the polyline (meters).
      Parameters:
      perimeter - the perimeter of the polygon or the length of the polyline.
    • getArea

      public double getArea()
      Gets the area of the polygon (meters2).
      Returns:
      area of the polygon.
    • setArea

      public void setArea(double area)
      Sets the area of the polygon (meters2).
      Parameters:
      area - area of the polygon.