All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.maptalks.geojson.GeometryCollection Maven / Gradle / Ivy

The newest version!
package org.maptalks.geojson;

/**
 * Created by fuzhen on 2015/8/11.
 */
public class GeometryCollection extends Geometry {
    private Geometry[] geometries;

    public GeometryCollection(Geometry[] geometries) {
        super();
        this.setGeometries(geometries);
    }

    public GeometryCollection(){
        super();
    }

    public Geometry[] getGeometries() {
        return geometries;
    }

    public void setGeometries(Geometry[] geometries) {
        this.geometries = geometries;
    }

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof GeometryCollection)) {
            return false;
        }
        GeometryCollection o = ((GeometryCollection) obj);
        int size = this.geometries.length;
        for (int i = 0; i < size; i++) {
            if (!this.geometries[i].equals(o.geometries[i])) {
                return false;
            }
        }
        return true;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy