Back to project page zmap.
The source code is released under:
GNU Lesser General Public License
If you think the Android project zmap listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.zmap.geom; /* w w w . j a va2s . c om*/ import java.util.ArrayList; class PointCollection implements IPointCollection, IPointCollectionEdit { PointCollection() { points = new ArrayList<IPoint>(); isEditing = false; } public int pointCount() { return points.size(); } public IPoint getPoint(int i) { return points.get(i); } public void addPoint(IPoint point) { if(!isEditing) { throw new UnsupportedOperationException(); } points.add(point); } public void insertPoint(IPoint point, int pos) { if(!isEditing) { throw new UnsupportedOperationException(); } points.add(pos, point); } public void removePoint(int pos) { if(!isEditing) { throw new UnsupportedOperationException(); } points.remove(pos); } public void beginEdit() { isEditing = true; } public void endEdit() { if(!isEditing) { throw new UnsupportedOperationException(); } update(); isEditing = false; } protected void update() { } protected ArrayList<IPoint> points; protected boolean isEditing; }