I have a simple question which I am unable to solve. I have a Vector<Vector<PointF>> object that I want to save into a ArrayList. I tried doing this:
ArrayList<Vector<Vector<PointF>>> my_arraylist = new ArrayList<Vector<Vector<PointF>>>();
and saving like this:
public void setMyArrayList(Vector<Vector<PointF>> polyLines) {
my_arraylist.add(polyLines);
this.my_arraylist = my_arraylist;
}
When I try to fetch a specific element in my_arraylist, I always get the last element in my_arraylist. Is there a specific way to save a <Vector<Vector<PointF>> into ArrayList?
I solved it. I had to create a
Objectand store in it by cloning theVectorArray:and store the temp value in my
Arraylist<Object>.Convert it back toVector<Vector<PointF>>whenever I needed to use a specific element in arraylist.