Author: bayard
Date: Tue Sep 15 05:56:43 2009
New Revision: 815100
URL: http://svn.apache.org/viewvc?rev=815100&view=rev
Log:
Merging from -r468106:814127 of collections_jdk5_branch - namely where this
code was generified; mostly in r738956.
Also see the following revisions:
------------------------------------------------------------------------
r555925 | skestle | 2007-07-13 03:39:24 -0700 (Fri, 13 Jul 2007) | 2 lines
Added Edwin Tellman's patch for COLLECTIONS-243.
It all seems pretty reasonable, and it should all be checked again as the
project is worked through
------------------------------------------------------------------------
Modified:
commons/proper/collections/trunk/src/java/org/apache/commons/collections/set/SynchronizedSet.java
Modified:
commons/proper/collections/trunk/src/java/org/apache/commons/collections/set/SynchronizedSet.java
URL:
http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/set/SynchronizedSet.java?rev=815100&r1=815099&r2=815100&view=diff
==============================================================================
---
commons/proper/collections/trunk/src/java/org/apache/commons/collections/set/SynchronizedSet.java
(original)
+++
commons/proper/collections/trunk/src/java/org/apache/commons/collections/set/SynchronizedSet.java
Tue Sep 15 05:56:43 2009
@@ -33,7 +33,7 @@
*
* @author Stephen Colebourne
*/
-public class SynchronizedSet extends SynchronizedCollection implements Set {
+public class SynchronizedSet<E> extends SynchronizedCollection<E> implements
Set<E> {
/** Serialization version */
private static final long serialVersionUID = -8304417378626543635L;
@@ -44,8 +44,8 @@
* @param set the set to decorate, must not be null
* @throws IllegalArgumentException if set is null
*/
- public static Set decorate(Set set) {
- return new SynchronizedSet(set);
+ public static <T> Set<T> decorate(Set<T> set) {
+ return new SynchronizedSet<T>(set);
}
//-----------------------------------------------------------------------
@@ -55,7 +55,7 @@
* @param set the set to decorate, must not be null
* @throws IllegalArgumentException if set is null
*/
- protected SynchronizedSet(Set set) {
+ protected SynchronizedSet(Set<E> set) {
super(set);
}
@@ -66,7 +66,7 @@
* @param lock the lock object to use, must not be null
* @throws IllegalArgumentException if set is null
*/
- protected SynchronizedSet(Set set, Object lock) {
+ protected SynchronizedSet(Set<E> set, Object lock) {
super(set, lock);
}
@@ -75,8 +75,8 @@
*
* @return the decorated set
*/
- protected Set getSet() {
- return (Set) collection;
+ protected Set<E> getSet() {
+ return (Set<E>) collection;
}
}