class PointList implements Iterable<GHPoint3D>, PointAccess {

    public PointList clone(boolean reverse) {
        PointList clonePL = new PointList(getSize(), is3D());
        if (is3D())
            for (int i = 0; i < getSize(); i++) {
                clonePL.add(getLatitude(i), getLongitude(i), getElevation(i));
            }
        else
            for (int i = 0; i < getSize(); i++) {
                clonePL.add(getLatitude(i), getLongitude(i));
            }
        if (reverse)
            clonePL.reverse();
        return clonePL;
    }

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

}