when(anchorValue.get(AnchorKey.BLIP)).thenReturn("newblip"); anchorListener.getValue().onValuesChanged( CollectionUtils.immutableMap(AnchorKey.WAVELET, "waveletid", AnchorKey.BLIP, "blipid"), CollectionUtils.immutableMap(AnchorKey.WAVELET, "newwavelet", AnchorKey.BLIP, "newblip")); anchorListener.getValue().onValuesChanged( CollectionUtils.immutableMap(AnchorKey.WAVELET, "waveletid", AnchorKey.BLIP, "blipid"), CollectionUtils.immutableMap(AnchorKey.WAVELET, "newwavelet", AnchorKey.BLIP, "newblip"));
when(anchorValue.get(AnchorKey.BLIP)).thenReturn("newblip"); anchorListener.getValue().onValuesChanged( CollectionUtils.immutableMap(AnchorKey.WAVELET, "waveletid", AnchorKey.BLIP, "blipid"), CollectionUtils.immutableMap(AnchorKey.WAVELET, "newwavelet", AnchorKey.BLIP, "newblip")); anchorListener.getValue().onValuesChanged( CollectionUtils.immutableMap(AnchorKey.WAVELET, "waveletid", AnchorKey.BLIP, "blipid"), CollectionUtils.immutableMap(AnchorKey.WAVELET, "newwavelet", AnchorKey.BLIP, "newblip"));
private void triggerOnValuesChanged(Map<K, V> oldValues, Map<K, V> newValues) { for (Listener<K, ? super V> listener : listeners) { listener.onValuesChanged(oldValues, newValues); } }
private void triggerOnDeleted() { for (Listener<K, ? super V> listener : listeners) { listener.onDeleted(); } }