protected Key keyForComponent(Component component) { final String cacheKey = Component.class.getSimpleName() + ":" + System.identityHashCode(component); Key interactionKey = null; if (!keyCache.containsKey(cacheKey)) { if (component.getInteraction() == null) { throw new IllegalArgumentException("Cannot generate a key for a component without interaction: " + component); } interactionKey = keyForInteraction(component.getInteraction()); } if (keyCache.containsKey(cacheKey)) { return keyCache.get(cacheKey); } if (interactionKey != null) { Key compKey = new Key(interactionKey.getUniqueString() + ":" + component.getShortLabel() + "[" + component.hashCode() + "]"); keyCache.put(cacheKey, compKey); return compKey; } throw new IllegalStateException("This component should already have already a key, generated when the interaction key is generated: " + component); }
protected Key keyForComponent(Component component) { final String cacheKey = Component.class.getSimpleName() + ":" + System.identityHashCode(component); Key interactionKey = null; if (!keyCache.containsKey(cacheKey)) { if (component.getInteraction() == null) { throw new IllegalArgumentException("Cannot generate a key for a component without interaction: " + component); } interactionKey = keyForInteraction(component.getInteraction()); } if (keyCache.containsKey(cacheKey)) { return keyCache.get(cacheKey); } if (interactionKey != null) { Key compKey = new Key(interactionKey.getUniqueString() + ":" + component.getShortLabel() + "[" + component.hashCode() + "]"); keyCache.put(cacheKey, compKey); return compKey; } throw new IllegalStateException("This component should already have already a key, generated when the interaction key is generated: " + component); }
key = keyForExperiment((Experiment) ao); } else if (ao instanceof Interaction) { key = keyForInteraction((Interaction) ao); } else if (ao instanceof Interactor) { key = keyForInteractor((Interactor) ao);
key = keyForExperiment((Experiment) ao); } else if (ao instanceof Interaction) { key = keyForInteraction((Interaction) ao); } else if (ao instanceof Interactor) { key = keyForInteractor((Interactor) ao);