(Object object, Method method)
| 1457 | |
| 1458 | |
| 1459 | void add(Object object, Method method) { |
| 1460 | if (findIndex(object) == -1) { |
| 1461 | if (objects == null) { |
| 1462 | objects = new Object[5]; |
| 1463 | methods = new Method[5]; |
| 1464 | |
| 1465 | } else if (count == objects.length) { |
| 1466 | objects = (Object[]) PApplet.expand(objects); |
| 1467 | methods = (Method[]) PApplet.expand(methods); |
| 1468 | } |
| 1469 | objects[count] = object; |
| 1470 | methods[count] = method; |
| 1471 | count++; |
| 1472 | } else { |
| 1473 | die(method.getName() + "() already added for this instance of " + |
| 1474 | object.getClass().getName()); |
| 1475 | } |
| 1476 | } |
| 1477 | |
| 1478 | |
| 1479 | /** |
no test coverage detected