diff options
author | Mark Wielaard <mark@klomp.org> | 2001-10-04 05:34:47 +0000 |
---|---|---|
committer | Mark Wielaard <mark@gcc.gnu.org> | 2001-10-04 05:34:47 +0000 |
commit | ce0d5fce2b08fc33961ae31c2032b6abf5bd40da (patch) | |
tree | 52a097293728b3e19e2c51a3382a5984edd0a0d6 /libjava/java/util | |
parent | 7754e0a9684f48609a9869619bbb405b5bcd9f47 (diff) | |
download | gcc-ce0d5fce2b08fc33961ae31c2032b6abf5bd40da.zip gcc-ce0d5fce2b08fc33961ae31c2032b6abf5bd40da.tar.gz gcc-ce0d5fce2b08fc33961ae31c2032b6abf5bd40da.tar.bz2 |
SequenceInputStream.java: Merge with Classpath
* java/io/SequenceInputStream.java: Merge with Classpath
* java/io/StringBufferInputStream.java: Ditto
* java/util/Collections.java: Remerge with Classpath
From-SVN: r46005
Diffstat (limited to 'libjava/java/util')
-rw-r--r-- | libjava/java/util/Collections.java | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/libjava/java/util/Collections.java b/libjava/java/util/Collections.java index 74efdec..3e2a40e5 100644 --- a/libjava/java/util/Collections.java +++ b/libjava/java/util/Collections.java @@ -1,5 +1,5 @@ /* Collections.java -- Utility class with methods to operate on collections - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -595,7 +595,7 @@ public class Collections * of this method is Serializable. * * @param o the single element. - * @returns an immutable Set containing only o. + * @return an immutable Set containing only o. */ // It's not serializable because the spec is broken. public static Set singleton(final Object o) @@ -645,7 +645,7 @@ public class Collections * of this method is Serializable. * * @param o the single element. - * @returns an immutable List containing only o. + * @return an immutable List containing only o. */ // It's not serializable because the spec is broken. public static List singletonList(final Object o) @@ -677,7 +677,7 @@ public class Collections * * @param key the single key. * @param value the single value. - * @returns an immutable Map containing only the single key value pair. + * @return an immutable Map containing only the single key value pair. */ // It's not serializable because the spec is broken. public static Map singletonMap(final Object key, final Object value) @@ -686,7 +686,7 @@ public class Collections { public Set entrySet() { - return singleton(new HashMap.Entry(key, value)); + return singleton(new BasicMapEntry(key, value)); } }; } @@ -1294,7 +1294,11 @@ public class Collections } } - private static class SynchronizedCollection implements Collection, + /** + * Package visible, so that collections such as the one for + * Hashtable.values() can specify which object to synchronize on. + */ + static class SynchronizedCollection implements Collection, Serializable { Object sync; @@ -1522,7 +1526,11 @@ public class Collections } } - private static class SynchronizedSet extends SynchronizedCollection + /** + * Package visible, so that sets such as the one for Hashtable.keySet() + * can specify which object to synchronize on. + */ + static class SynchronizedSet extends SynchronizedCollection implements Set { public SynchronizedSet(Object sync, Set s) |