class PointList implements Iterable<GHPoint3D>, PointAccess {

    @Override
    public boolean equals(Object obj) {
        if (obj == null)
            return false;

        PointList other = (PointList) obj;
        if (this.isEmpty() && other.isEmpty())
            return true;

        if (this.getSize() != other.getSize() || this.is3D() != other.is3D())
            return false;

        for (int i = 0; i < size(); i++) {
            if (!equalsEps(getLatitude(i), other.getLatitude(i)))
                return false;

            if (!equalsEps(getLongitude(i), other.getLongitude(i)))
                return false;

            if (this.is3D() && !equalsEps(getElevation(i), other.getElevation(i)))
                return false;
        }
        return true;
    }

    public  PointList();
    public  PointList(int cap, boolean is3D);

}