I have two arraylist
private final ArrayList children = new ArrayList();
private final ArrayList values = new ArrayList();
I have a method which when called with a value(index number) should fill the children arrayList taking values from the values ArrayList starting at the given index i and filling it circularly.

private void populateList(int i)
{
children.clear();
// A logic to add list in this form as shown in the above picture.
children.add(values.get(i));
children.add(values.get(i + 1));
...
}
I need a logic that will copy the values from the values arrayList to children arrayList with best performance in a circular order from the given index.