Package net.sf.eBusx.geo
Class GeoCollection
- java.lang.Object
-
- net.sf.eBus.messages.EMessageObject
-
- net.sf.eBus.messages.EField
-
- net.sf.eBusx.geo.GeoObject
-
- net.sf.eBusx.geo.GeoCollection
-
- All Implemented Interfaces:
java.io.Serializable
public final class GeoCollection extends GeoObject
A collection of GeoJSON objects of different types.- Author:
- Charles W. Rapp
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GeoCollection.Builder
Builder class used to create GeoJSON collection 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 GeoObject[]
geometries
GeoJSON objects collection.-
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 GeoCollection.Builder
builder()
Returns a new instance of anGeoCollection
builder.boolean
equals(java.lang.Object o)
Returnstrue
ifo
is the same instance asthis GeoCollection
or ifo
is a non-null GeoCollection
instance whose geometries array equalsthis GeoCollection
's array.int
hashCode()
Returns hash of geometries.boolean
isEmpty()
Returnstrue
if thisGeoObject
collection has no items;false
otherwise.java.lang.String
toString()
Returns text specifying GeoJSON type and attributes-
Methods inherited from class net.sf.eBusx.geo.GeoObject
validateLatitude, validateLongitude
-
-
-
-
Field Detail
-
geometries
public final GeoObject[] geometries
GeoJSON objects collection.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
Returnstrue
ifo
is the same instance asthis GeoCollection
or ifo
is a non-null GeoCollection
instance whose geometries array equalsthis GeoCollection
's array.- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- comparison object.- Returns:
true
ifo
equalsthis GeoCollection
instance.
-
hashCode
public int hashCode()
Returns hash of geometries.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- geometries hash.
-
toString
public java.lang.String toString()
Description copied from class:GeoObject
Returns text specifying GeoJSON type and attributes
-
isEmpty
public boolean isEmpty()
Returnstrue
if thisGeoObject
collection has no items;false
otherwise.- Returns:
true
if this element contains no items.
-
builder
public static GeoCollection.Builder builder()
Returns a new instance of anGeoCollection
builder.- Returns:
- GeoJSON collection builder.
-
-