You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2009/09/01 11:17:12 UTC
svn commit: r809914 - in
/incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent:
SynchronizedCollection.java SynchronizedList.java SynchronizedMap.java
SynchronizedQueue.java SynchronizedSet.java SynchronizedStack.java
Author: smartini
Date: Tue Sep 1 09:17:10 2009
New Revision: 809914
URL: http://svn.apache.org/viewvc?rev=809914&view=rev
Log:
add some missing override, in some cases on methods of inner classes (not shown in eclipse warnings)
Modified:
incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedCollection.java
incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedList.java
incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedMap.java
incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedQueue.java
incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedSet.java
incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedStack.java
Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedCollection.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedCollection.java?rev=809914&r1=809913&r2=809914&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedCollection.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedCollection.java Tue Sep 1 09:17:10 2009
@@ -40,14 +40,17 @@
this.collection = collection;
}
+ @Override
public synchronized void clear() {
collection.clear();
}
+ @Override
public synchronized Comparator<T> getComparator() {
return collection.getComparator();
}
+ @Override
public synchronized void setComparator(Comparator<T> comparator) {
collection.setComparator(comparator);
}
@@ -56,6 +59,7 @@
* NOTE Callers must manually synchronize on the SynchronizedCollection
* instance to ensure thread safety during iteration.
*/
+ @Override
public Iterator<T> iterator() {
return new ImmutableIterator<T>(collection.iterator());
}
Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedList.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedList.java?rev=809914&r1=809913&r2=809914&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedList.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedList.java Tue Sep 1 09:17:10 2009
@@ -73,6 +73,7 @@
super(list);
}
+ @Override
public synchronized int add(T item) {
int index = ((List<T>)collection).add(item);
listListeners.itemInserted(this, index);
@@ -80,11 +81,13 @@
return index;
}
+ @Override
public synchronized void insert(T item, int index) {
((List<T>)collection).insert(item, index);
listListeners.itemInserted(this, index);
}
+ @Override
public synchronized T update(int index, T item) {
T previousItem = ((List<T>)collection).update(index, item);
if (previousItem != item) {
@@ -94,6 +97,7 @@
return previousItem;
}
+ @Override
public synchronized int remove (T item) {
int index = indexOf(item);
if (index == -1) {
@@ -105,6 +109,7 @@
return index;
}
+ @Override
public synchronized Sequence<T> remove(int index, int count) {
Sequence<T> removed = ((List<T>)collection).remove(index, count);
if (count > 0) {
@@ -114,18 +119,22 @@
return removed;
}
+ @Override
public synchronized T get(int index) {
return ((List<T>)collection).get(index);
}
+ @Override
public synchronized int indexOf(T item) {
return ((List<T>)collection).indexOf(item);
}
+ @Override
public synchronized int getLength() {
return ((List<T>)collection).getLength();
}
+ @Override
public ListenerList<ListListener<T>> getListListeners() {
return listListeners;
}
Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedMap.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedMap.java?rev=809914&r1=809913&r2=809914&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedMap.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedMap.java Tue Sep 1 09:17:10 2009
@@ -73,11 +73,13 @@
}
@SuppressWarnings("unchecked")
+ @Override
public synchronized V get(K key) {
return ((Map<K, V>)collection).get(key);
}
@SuppressWarnings("unchecked")
+ @Override
public synchronized V put(K key, V value) {
boolean update = containsKey(key);
V previousValue = ((Map<K, V>)collection).put(key, value);
@@ -93,6 +95,7 @@
}
@SuppressWarnings("unchecked")
+ @Override
public synchronized V remove(K key) {
V value = null;
@@ -105,20 +108,24 @@
}
@SuppressWarnings("unchecked")
+ @Override
public synchronized boolean isEmpty() {
return ((Map<K, V>)collection).isEmpty();
}
@SuppressWarnings("unchecked")
+ @Override
public synchronized boolean containsKey(K key) {
return ((Map<K, V>)collection).containsKey(key);
}
@SuppressWarnings("unchecked")
+ @Override
public synchronized int getCount() {
return ((Map<K, V>)collection).getCount();
}
+ @Override
public ListenerList<MapListener<K, V>> getMapListeners() {
return mapListeners;
}
Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedQueue.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedQueue.java?rev=809914&r1=809913&r2=809914&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedQueue.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedQueue.java Tue Sep 1 09:17:10 2009
@@ -55,6 +55,7 @@
super(queue);
}
+ @Override
public synchronized void enqueue(T item) {
((Queue<T>)collection).enqueue(item);
queueListeners.itemEnqueued(this, item);
@@ -62,6 +63,7 @@
notify();
}
+ @Override
public synchronized T dequeue() {
T item = null;
try {
@@ -77,14 +79,17 @@
return item;
}
+ @Override
public synchronized T peek() {
return ((Queue<T>)collection).peek();
}
+ @Override
public synchronized boolean isEmpty() {
return ((Queue<T>)collection).isEmpty();
}
+ @Override
public ListenerList<QueueListener<T>> getQueueListeners() {
return queueListeners;
}
Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedSet.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedSet.java?rev=809914&r1=809913&r2=809914&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedSet.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedSet.java Tue Sep 1 09:17:10 2009
@@ -66,6 +66,7 @@
super(set);
}
+ @Override
public synchronized boolean add(E element) {
boolean added = false;
@@ -79,6 +80,7 @@
return added;
}
+ @Override
public synchronized boolean remove(E element) {
boolean removed = false;
@@ -92,18 +94,22 @@
return removed;
}
+ @Override
public synchronized boolean contains(E element) {
return ((Set<E>)collection).contains(element);
}
+ @Override
public synchronized boolean isEmpty() {
return ((Set<E>)collection).isEmpty();
}
+ @Override
public synchronized int getCount() {
return ((Set<E>)collection).getCount();
}
+ @Override
public ListenerList<SetListener<E>> getSetListeners() {
return setListeners;
}
Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedStack.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedStack.java?rev=809914&r1=809913&r2=809914&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedStack.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedStack.java Tue Sep 1 09:17:10 2009
@@ -55,6 +55,7 @@
super(stack);
}
+ @Override
public synchronized void push(T item) {
((Stack<T>)collection).push(item);
stackListeners.itemPushed(this, item);
@@ -62,6 +63,7 @@
notify();
}
+ @Override
public synchronized T pop() {
T item = null;
try {
@@ -78,14 +80,17 @@
return item;
}
+ @Override
public synchronized T peek() {
return ((Stack<T>)collection).peek();
}
+ @Override
public synchronized boolean isEmpty() {
return ((Stack<T>)collection).isEmpty();
}
+ @Override
public ListenerList<StackListener<T>> getStackListeners() {
return stackListeners;
}