Merging from -r468106:814127 of collections_jdk5_branch - namely where this code was generified; mostly in r738956.
Also see the following revisions: ------------------------------------------------------------------------ r471186 | scolebourne | 2006-11-04 05:47:51 -0800 (Sat, 04 Nov 2006) | 1 line Remove getSet() and getSortedSet() - use decorated() ------------------------------------------------------------------------ r471173 | scolebourne | 2006-11-04 04:07:39 -0800 (Sat, 04 Nov 2006) | 1 line Abstract*Decorator - Generify and use covariant return types ------------------------------------------------------------------------ git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@815095 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1f5561a766
commit
8c9bf23bf6
|
@ -25,12 +25,17 @@ import org.apache.commons.collections.collection.AbstractCollectionDecorator;
|
|||
* <p>
|
||||
* Methods are forwarded directly to the decorated set.
|
||||
*
|
||||
* @param <E> the type of the elements in the set
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision$ $Date$
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
*/
|
||||
public abstract class AbstractSetDecorator extends AbstractCollectionDecorator implements Set {
|
||||
public abstract class AbstractSetDecorator<E> extends AbstractCollectionDecorator<E> implements
|
||||
Set<E> {
|
||||
|
||||
/** Serialization version */
|
||||
private static final long serialVersionUID = -4678668309576958546L;
|
||||
|
||||
/**
|
||||
* Constructor only used in deserialization, do not use otherwise.
|
||||
|
@ -46,7 +51,7 @@ public abstract class AbstractSetDecorator extends AbstractCollectionDecorator i
|
|||
* @param set the set to decorate, must not be null
|
||||
* @throws IllegalArgumentException if set is null
|
||||
*/
|
||||
protected AbstractSetDecorator(Set set) {
|
||||
protected AbstractSetDecorator(Set<E> set) {
|
||||
super(set);
|
||||
}
|
||||
|
||||
|
@ -55,8 +60,8 @@ public abstract class AbstractSetDecorator extends AbstractCollectionDecorator i
|
|||
*
|
||||
* @return the decorated set
|
||||
*/
|
||||
protected Set getSet() {
|
||||
return (Set) getCollection();
|
||||
protected Set<E> decorated() {
|
||||
return (Set<E>) super.decorated();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue