ArrayList<ArrayList<Float>> segs = new ArrayList<ArrayList<Float>>();
In my opinion this is hard to read and to maintain.
Instead make a class MyFLoatClass and an Arraylist of that
Arraylist<MyFLoatClass> list = new ArrayList();
Inside the class MyFLoatClass have another ArrayList.
Much clearer.
Chrisir