/** Removes the Influencer of the given type. */ public <K extends Influencer> void removeInfluencer (Class<K> type) { int index = findIndex(type); if (index > -1) influencers.removeIndex(index); }
/** Removes the Influencer of the given type. */ public <K extends Influencer> void removeInfluencer (Class<K> type) { int index = findIndex(type); if (index > -1) influencers.removeIndex(index); }
/** @return the influencer having the given type. */ public <K extends Influencer> K findInfluencer (Class<K> influencerClass) { int index = findIndex(influencerClass); return index > -1 ? (K)influencers.get(index) : null; }
/** @return the influencer having the given type. */ public <K extends Influencer> K findInfluencer (Class<K> influencerClass) { int index = findIndex(influencerClass); return index > -1 ? (K)influencers.get(index) : null; }
/** Replaces the Influencer of the given type with the one passed as parameter. */ public <K extends Influencer> boolean replaceInfluencer (Class<K> type, K newInfluencer) { int index = findIndex(type); if (index > -1) { influencers.insert(index, newInfluencer); influencers.removeIndex(index + 1); return true; } return false; }
/** Replaces the Influencer of the given type with the one passed as parameter. */ public <K extends Influencer> boolean replaceInfluencer (Class<K> type, K newInfluencer) { int index = findIndex(type); if (index > -1) { influencers.insert(index, newInfluencer); influencers.removeIndex(index + 1); return true; } return false; }
/** @return the influencer having the given type. */ public <K extends Influencer> K findInfluencer (Class<K> influencerClass) { int index = findIndex(influencerClass); return index > -1 ? (K)influencers.get(index) : null; }
/** Removes the Influencer of the given type. */ public <K extends Influencer> void removeInfluencer (Class<K> type) { int index = findIndex(type); if (index > -1) influencers.removeIndex(index); }
/** Replaces the Influencer of the given type with the one passed as parameter. */ public <K extends Influencer> boolean replaceInfluencer (Class<K> type, K newInfluencer) { int index = findIndex(type); if (index > -1) { influencers.insert(index, newInfluencer); influencers.removeIndex(index + 1); return true; } return false; }