br.com.anteros.nosql.persistence.mongodb.geo.MultiLineString Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Anteros-NoSql-Persistence-MongoDB Show documentation
Show all versions of Anteros-NoSql-Persistence-MongoDB Show documentation
Anteros NoSQL Persistence MongoDB.
package br.com.anteros.nosql.persistence.mongodb.geo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class MultiLineString implements Geometry {
private final List coordinates;
@SuppressWarnings("UnusedDeclaration")
private MultiLineString() {
this.coordinates = new ArrayList();
}
MultiLineString(final LineString... lineStrings) {
coordinates = Arrays.asList(lineStrings);
}
MultiLineString(final List coordinates) {
this.coordinates = coordinates;
}
@Override
public List getCoordinates() {
return coordinates;
}
@Override
public int hashCode() {
return coordinates.hashCode();
}
/* equals, hashCode and toString. Useful primarily for testing and debugging. Don't forget to re-create when changing this class */
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MultiLineString that = (MultiLineString) o;
if (!coordinates.equals(that.coordinates)) {
return false;
}
return true;
}
@Override
public String toString() {
return "MultiLineString{"
+ "coordinates=" + coordinates
+ '}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy