public void rebuildIndexes() {
    Cycle[] cycles = new Cycle[myCycles.size()];
    for (Cycle c : myCycles) {
      int index = MainPanel.getTabbIndex(c.myControl);
      cycles[index] = c;
    }
    myCycles = new ArrayList<Cycle>(Arrays.asList(cycles));
  }
The management of a collection of Cycles which contain the
model, view (graph) and the controller ui panel.
ConstraintLayoutExamples/CycleEditor/src/com/google/androidstudio/motionlayoutcycles/CycleSetModel.java