Class GeoCircle

  • All Implemented Interfaces:
    java.io.Serializable

    public final class GeoCircle
    extends GeoObject
    Defines a GeoJSON circle by the center point, radius, and radius units.
    Author:
    Charles W. Rapp
    See Also:
    Serialized Form
    • Field Detail

      • DEFAULT_RADIUS_UNITS

        public static final java.lang.String DEFAULT_RADIUS_UNITS
        Default units defining circle radius is kilometers ("km").
        See Also:
        Constant Field Values
      • center

        public final Position center
        Circle center coordinate.
      • radius

        public final java.math.BigDecimal radius
        Circle radius.
      • radiusUnits

        public final java.lang.String radiusUnits
        Radius is defined in these units. Default to DEFAULT_RADIUS_UNITS.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Returns true if o is the same instance as this GeoCircle or if o is a non-null GeoCircle instance whose center, radius, and radius units equals this GeoCircle's values.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - comparison object.
        Returns:
        true if o equals this GeoCircle instance.
      • hashCode

        public int hashCode()
        Returns hash code of center, radius, and radius units.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        GeoJSON circle hash code.
      • toString

        public java.lang.String toString()
        Description copied from class: GeoObject
        Returns text specifying GeoJSON type and attributes
        Overrides:
        toString in class GeoObject
        Returns:
        human-readable text containing GeoJSON type name and attributes.