You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/08/03 14:06:46 UTC
svn commit: r800325 - in
/incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable:
ImmutableMap.java ImmutableSet.java
Author: tvolkert
Date: Mon Aug 3 12:06:45 2009
New Revision: 800325
URL: http://svn.apache.org/viewvc?rev=800325&view=rev
Log:
Applied fix to ImmutableSet and ImmutableMap that was applied to ImmutableList -- they needed to return valid listener lists
Modified:
incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable/ImmutableMap.java
incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable/ImmutableSet.java
Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable/ImmutableMap.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable/ImmutableMap.java?rev=800325&r1=800324&r2=800325&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable/ImmutableMap.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable/ImmutableMap.java Mon Aug 3 12:06:45 2009
@@ -33,6 +33,8 @@
public class ImmutableMap<K, V> implements Map<K, V> {
private Map<K, V> map = null;
+ private MapListenerList<K, V> mapListeners = new MapListenerList<K, V>();
+
public ImmutableMap(Map<K, V> map) {
if (map == null) {
throw new IllegalArgumentException("map is null.");
@@ -83,6 +85,6 @@
}
public ListenerList<MapListener<K, V>> getMapListeners() {
- throw new UnsupportedOperationException();
+ return mapListeners;
}
}
Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable/ImmutableSet.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable/ImmutableSet.java?rev=800325&r1=800324&r2=800325&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable/ImmutableSet.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable/ImmutableSet.java Mon Aug 3 12:06:45 2009
@@ -33,6 +33,8 @@
public class ImmutableSet<E> implements Set<E> {
private Set<E> set = null;
+ private SetListenerList<E> setListeners = new SetListenerList<E>();
+
public ImmutableSet(Set<E> set) {
if (set == null) {
throw new IllegalArgumentException("set is null.");
@@ -78,6 +80,6 @@
}
public ListenerList<SetListener<E>> getSetListeners() {
- throw new UnsupportedOperationException();
+ return setListeners;
}
}