diff options
Diffstat (limited to 'java/util/LinkedHashSet.java')
-rw-r--r-- | java/util/LinkedHashSet.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/java/util/LinkedHashSet.java b/java/util/LinkedHashSet.java index 6c68195c3..a0b32f349 100644 --- a/java/util/LinkedHashSet.java +++ b/java/util/LinkedHashSet.java @@ -1,6 +1,6 @@ /* LinkedHashSet.java -- a set backed by a LinkedHashMap, for linked list traversal. - Copyright (C) 2001, 2005 Free Software Foundation, Inc. + Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -88,8 +88,8 @@ import java.io.Serializable; * @since 1.4 * @status updated to 1.4 */ -public class LinkedHashSet extends HashSet - implements Set, Cloneable, Serializable +public class LinkedHashSet<T> extends HashSet<T> + implements Set<T>, Cloneable, Serializable { /** * Compatible with JDK 1.4. @@ -140,7 +140,7 @@ public class LinkedHashSet extends HashSet * @param c a collection of initial set elements * @throws NullPointerException if c is null */ - public LinkedHashSet(Collection c) + public LinkedHashSet(Collection<? extends T> c) { super(c); } @@ -152,9 +152,8 @@ public class LinkedHashSet extends HashSet * @param load the initial load factor * @return the backing HashMap */ - HashMap init(int capacity, float load) + HashMap<T, String> init(int capacity, float load) { - return new LinkedHashMap(capacity, load); + return new LinkedHashMap<T, String>(capacity, load); } - } |