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 classGeoCollection.BuilderBuilder 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[]geometriesGeoJSON 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.Builderbuilder()Returns a new instance of anGeoCollectionbuilder.booleanequals(java.lang.Object o)Returnstrueifois the same instance asthis GeoCollectionor ifois a non-null GeoCollectioninstance whose geometries array equalsthis GeoCollection's array.inthashCode()Returns hash of geometries.booleanisEmpty()Returnstrueif thisGeoObjectcollection has no items;falseotherwise.java.lang.StringtoString()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)
Returnstrueifois the same instance asthis GeoCollectionor ifois a non-null GeoCollectioninstance whose geometries array equalsthis GeoCollection's array.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- comparison object.- Returns:
trueifoequalsthis GeoCollectioninstance.
-
hashCode
public int hashCode()
Returns hash of geometries.- Overrides:
hashCodein classjava.lang.Object- Returns:
- geometries hash.
-
toString
public java.lang.String toString()
Description copied from class:GeoObjectReturns text specifying GeoJSON type and attributes
-
isEmpty
public boolean isEmpty()
Returnstrueif thisGeoObjectcollection has no items;falseotherwise.- Returns:
trueif this element contains no items.
-
builder
public static GeoCollection.Builder builder()
Returns a new instance of anGeoCollectionbuilder.- Returns:
- GeoJSON collection builder.
-
-