package me.itszooti.geojson;

import java.util.ArrayList;
import java.util.List;

public class GeoPolygon extends GeoGeometry {

	private List<GeoPosition> exterior;
	private List<List<GeoPosition>> interiors;
	
	public GeoPolygon(List<GeoPosition> exterior) {
		this.exterior = new ArrayList<GeoPosition>(exterior);
		this.interiors = new ArrayList<List<GeoPosition>>();
	}
	
	public GeoPolygon(List<GeoPosition> exterior, List<List<GeoPosition>> interiors) {
		this(exterior);
		for (List<GeoPosition> interior : interiors) {
			this.interiors.add(new ArrayList<GeoPosition>(interior));
		}
	}
	
	public int getNumInteriors() {
		return interiors.size();
	}
	
	public GeoPosition[] getInterior(int index) {
		List<GeoPosition> interior = interiors.get(index);
		return interior.toArray(new GeoPosition[interior.size()]);
	}
	
	public GeoPosition[] getExterior() {
		return exterior.toArray(new GeoPosition[exterior.size()]);
	}
	
}

@@ -51,16 +51,41 @@
 ayList;%0A
+import java.util.Arrays;%0A
 import j
@@ -612,24 +612,320 @@
 );%0A%09%09%7D%0A%09%7D%0A%09%0A
+%09public GeoPolygon(GeoPosition%5B%5D exterior) %7B%0A%09%09this(Arrays.asList(exterior));%0A%09%7D%0A%09%0A%09public GeoPolygon(GeoPosition%5B%5D exterior, GeoPosition%5B%5D%5B%5D interiors) %7B%0A%09%09this(Arrays.asList(exterior));%0A%09%09for (int i = 0; i %3C interiors.length; i++) %7B%0A%09%09%09this.interiors.add(Arrays.asList(interiors%5Bi%5D));%0A%09%09%7D%0A%09%7D%0A%09%0A
 %09public int 

Add array constructor to polygon