hydra.ext.org.geojson.model.GeometryCollection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hydra-ext Show documentation
Show all versions of hydra-ext Show documentation
Hydra language extensions in Java; models, coders, and utilities
The newest version!
// Note: this is an automatically generated file. Do not edit.
package hydra.ext.org.geojson.model;
import java.io.Serializable;
/**
* A GeoJSON object with type "GeometryCollection" is a Geometry object. A GeometryCollection has a member with the name "geometries". The value of "geometries" is an array. Each element of this array is a GeoJSON Geometry object. It is possible for this array to be empty.
*/
public class GeometryCollection implements Serializable {
public static final hydra.core.Name TYPE_NAME = new hydra.core.Name("hydra/ext/org/geojson/model.GeometryCollection");
public static final hydra.core.Name FIELD_NAME_GEOMETRIES = new hydra.core.Name("geometries");
public static final hydra.core.Name FIELD_NAME_BBOX = new hydra.core.Name("bbox");
public final java.util.List geometries;
public final hydra.util.Opt bbox;
public GeometryCollection (java.util.List geometries, hydra.util.Opt bbox) {
java.util.Objects.requireNonNull((geometries));
java.util.Objects.requireNonNull((bbox));
this.geometries = geometries;
this.bbox = bbox;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof GeometryCollection)) {
return false;
}
GeometryCollection o = (GeometryCollection) (other);
return geometries.equals(o.geometries) && bbox.equals(o.bbox);
}
@Override
public int hashCode() {
return 2 * geometries.hashCode() + 3 * bbox.hashCode();
}
public GeometryCollection withGeometries(java.util.List geometries) {
java.util.Objects.requireNonNull((geometries));
return new GeometryCollection(geometries, bbox);
}
public GeometryCollection withBbox(hydra.util.Opt bbox) {
java.util.Objects.requireNonNull((bbox));
return new GeometryCollection(geometries, bbox);
}
}