MCPcopy Index your code
hub / github.com/OpenSourcePhysics/osp / removeObjects

Method removeObjects

src/debugging/applets/ObjectManager.java:149–158  ·  view source on GitHub ↗

Removes objects of an assignable type. @param c the type of object

(Class<?> c)

Source from the content-addressed store, hash-verified

147 * @param c the type of object
148 */
149 public void removeObjects(Class<?> c) {
150 HashMap<String, Object> map = new HashMap<>(myObjects); // clone the object map
151 Iterator<Object> it = map.values().iterator();
152 while (it.hasNext()) { // copy only the obejcts of the correct type
153 Object obj = it.next();
154 if (!c.isInstance(obj)) {
155 it.remove();
156 }
157 }
158 }
159
160 /**
161 * Removes an object from the manager.

Callers

nothing calls this directly

Calls 3

removeMethod · 0.65
hasNextMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected