@Override public void setIndexability(ParticipantId participant, IndexDecision indexability) { Preconditions.checkNotNull(participant, "Participant can't be null"); IndexDecision current = getIndexability(participant); if (indexability == null) { map.remove(participant); } else { map.put(participant, indexability); } if (current != indexability) { for (ObservableIndexability.Listener l : listeners) { l.onChanged(participant, indexability); } } }
@Override public void onEntrySet(ParticipantId key, IndexDecision oldValue, IndexDecision newValue) { for (ObservableIndexability.Listener l : listeners) { l.onChanged(key, newValue); } }