@Test public void testRemove() { selection.setRoot("scene", scene); selection.set("scene", "editedGroup", scene); selection.set("editedGroup", "sceneElement", child); selection.set("sceneElement", "component", child); assertEquals(4, selection.getContexts().size); Array<Context> contextRemoved = selection.set("scene", "editedGroup", new ModelEntity()); assertEquals(2, selection.getContexts().size); assertEquals(3, contextRemoved.size); selection.set("scene", "editedGroup", scene); selection.set("editedGroup", "sceneElement", child); selection.set("sceneElement", "component", child); assertEquals(4, selection.getContexts().size); contextRemoved = selection.set("editedGroup", "whatever", component); assertEquals(3, selection.getContexts().size); assertEquals(2, contextRemoved.size); }
public Context remove(String contextId) { int index = getIndex(contextId); if (index == -1) { return null; } if (index == pointer) { pointer--; } return contexts.removeIndex(index); }
Selection { public Context remove(String contextId) { int index = getIndex(contextId); if (index == -1) { return null; } if (index == pointer) { pointer--; } return contexts.removeIndex(index); } }
Selection { public Context remove(String contextId) { int index = getIndex(contextId); if (index == -1) { return null; } if (index == pointer) { pointer--; } return contexts.removeIndex(index); } Selection(); }
Selection { public Context remove(String contextId) { int index = getIndex(contextId); if (index == -1) { return null; } if (index == pointer) { pointer--; } return contexts.removeIndex(index); } Selection(); Array<Context> setRoot(String contextId, Object... selection); Array<Context> set(String parentContextId, String contextId,
			Object... selection); Context getCurrentContext(); Object[] getCurrent(); Object[] get(String contextId); Object getSingle(String contextId); boolean contains(String contextId, Object object); Array<Context> getContexts(); Context getContext(String contextId); Context remove(String contextId); void clear(); }
Selection { public Context remove(String contextId) { int index = getIndex(contextId); if (index == -1) { return null; } if (index == pointer) { pointer--; } return contexts.removeIndex(index); } Selection(); Array<Context> setRoot(String contextId, Object... selection); Array<Context> set(String parentContextId, String contextId,
			Object... selection); Context getCurrentContext(); Object[] getCurrent(); Object[] get(String contextId); Object getSingle(String contextId); boolean contains(String contextId, Object object); Array<Context> getContexts(); Context getContext(String contextId); Context remove(String contextId); void clear(); static final String RESOURCE; static final String MOKAP; static final String MOKAP_RESOURCE; static final String SCENE; static final String EDITED_GROUP; static final String SCENE_ELEMENT; static final String BEHAVIOR; static final String FRAMES; static final String FRAME; static final String DEBUG; static final String SCENE_MAP; }