/** * Adds a consumer provided by the implementation. * * @param consumer the consumer to add */ public void add(Consumer<ComponentType> consumer) { consumer.setParent(this); consumers.put(consumer.getName(), consumer); }
/** * Adds a consumer to this component. * * @param consumer the consumer to add */ public void add(Consumer<Component> consumer) { consumer.setParent(this); consumers.put(consumer.getName(), consumer); }