Package net.sf.eBusx.geo
Class GeoCircle
- java.lang.Object
-
- net.sf.eBus.messages.EMessageObject
-
- net.sf.eBus.messages.EField
-
- net.sf.eBusx.geo.GeoObject
-
- net.sf.eBusx.geo.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GeoCircle.Builder
Builder class used to create GeoJSON circle instance.-
Nested classes/interfaces inherited from class net.sf.eBusx.geo.GeoObject
GeoObject.GeoBuilder<F extends GeoObject,B extends GeoObject.GeoBuilder<F,?>>, GeoObject.GeoType
-
-
Field Summary
Fields Modifier and Type Field Description Position
center
Circle center coordinate.static java.lang.String
DEFAULT_RADIUS_UNITS
Default units defining circle radius is kilometers ("km").java.math.BigDecimal
radius
Circle radius.java.lang.String
radiusUnits
Radius is defined in these units.-
Fields inherited from class net.sf.eBusx.geo.GeoObject
boundingBox, MAX_LATITUDE, MAX_LONGITUDE, MIN_LATITUDE, MIN_LONGITUDE, type
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GeoCircle.Builder
builder()
Returns a new instance of aGeoCircle
builder.boolean
equals(java.lang.Object o)
Returnstrue
ifo
is the same instance asthis GeoCircle
or ifo
is a non-null GeoCircle
instance whose center, radius, and radius units equalsthis GeoCircle
's values.int
hashCode()
Returns hash code of center, radius, and radius units.java.lang.String
toString()
Returns text specifying GeoJSON type and attributes-
Methods inherited from class net.sf.eBusx.geo.GeoObject
validateLatitude, validateLongitude
-
-
-
-
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 toDEFAULT_RADIUS_UNITS
.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
Returnstrue
ifo
is the same instance asthis GeoCircle
or ifo
is a non-null GeoCircle
instance whose center, radius, and radius units equalsthis GeoCircle
's values.- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- comparison object.- Returns:
true
ifo
equalsthis GeoCircle
instance.
-
hashCode
public int hashCode()
Returns hash code of center, radius, and radius units.- Overrides:
hashCode
in classjava.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
-
builder
public static GeoCircle.Builder builder()
Returns a new instance of aGeoCircle
builder.- Returns:
- GeoJSON circle builder.
- See Also:
GeoCircle.Builder
-
-