Component (Container aContainer, Component aComponent) { if (!myComponentToIndex.containsKey(aComponent)) { return null; } int i = myComponentToIndex.get(aComponent); return getNextComponent((i==-1?0:i) + 1); }