Defining an ArrayList of objects in Java
Posted on 2012-09-11
I would like to define an ArrayList of Geometries, a geometry can be either a point, polyline or polygon. The last two in turn are defined as an ArrayList of points.
I am getting confused on how to create such class structures for this?
This is just a mock up of how I would like the end result
Element 1> Point
Element 2> Point
Element 3> Polyline (This will be an ArrayList of points)
Element 4> Polygon (This will be an ArrayList of points)
Element 5> Point
Any help would be greatly appreciated!