javaprims.h: Updated class declaration list.
* gcj/javaprims.h: Updated class declaration list. * Makefile.in: Rebuilt. * Makefile.am (core_java_source_files): Added PropertyPermissionCollection.java. * java/lang/Thread.java (group, name): Now package-private. * java/lang/ThreadGroup.java: Re-merge with Classpath. * java/util/AbstractList.java: Likewise. * java/util/AbstractMap.java: Likewise. * java/util/Calendar.java: Likewise. * java/util/Collections.java: Likewise. * java/util/HashMap.java: Likewise. * java/util/Hashtable.java: Likewise. * java/util/LinkedHashMap.java: Likewise. * java/util/LinkedList.java: Likewise. * java/util/List.java: Likewise. * java/util/ListResourceBundle.java: Likewise. * java/util/Map.java: Likewise. * java/util/Observable.java: Likewise. * java/util/Properties.java: Likewise. * java/util/PropertyPermission.java: Likewise. * java/util/PropertyPermissionCollection.java: Likewise. * java/util/PropertyResourceBundle.java: Likewise. * java/util/Random.java: Likewise. * java/util/SimpleTimeZone.java: Likewise. * java/util/StringTokenizer.java: Likewise. * java/util/TimerTask.java: Likewise. * java/util/TreeMap.java: Likewise. * java/util/WeakHashMap.java: Likewise. * java/util/jar/Attributes.java: Likewise. * java/util/jar/JarException.java: Likewise. * java/util/jar/Manifest.java: Likewise. From-SVN: r54743
This commit is contained in:
parent
0fd534ed06
commit
3831381763
31 changed files with 2304 additions and 1518 deletions
|
@ -1,5 +1,5 @@
|
|||
/* AbstractList.java -- Abstract implementation of most of List
|
||||
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
|
@ -237,20 +237,22 @@ public abstract class AbstractList extends AbstractCollection implements List
|
|||
}
|
||||
|
||||
/**
|
||||
* Obtain a hash code for this list. In order to obey the general contract of
|
||||
* the hashCode method of class Object, this value is calculated as follows:
|
||||
* <pre>
|
||||
* hashCode = 1;
|
||||
* Iterator i = list.iterator();
|
||||
* while (i.hasNext())
|
||||
* {
|
||||
* Object obj = i.next();
|
||||
* hashCode = 31 * hashCode + (obj == null ? 0 : obj.hashCode());
|
||||
* }
|
||||
* </pre>
|
||||
* Obtains a hash code for this list. In order to obey the general
|
||||
* contract of the hashCode method of class Object, this value is
|
||||
* calculated as follows:
|
||||
*
|
||||
<pre>hashCode = 1;
|
||||
Iterator i = list.iterator();
|
||||
while (i.hasNext())
|
||||
{
|
||||
Object obj = i.next();
|
||||
hashCode = 31 * hashCode + (obj == null ? 0 : obj.hashCode());
|
||||
}</pre>
|
||||
*
|
||||
* This ensures that the general contract of Object.hashCode() is adhered to.
|
||||
*
|
||||
* @return the hash code of this list
|
||||
*
|
||||
* @see Object#hashCode()
|
||||
* @see #equals(Object)
|
||||
*/
|
||||
|
@ -611,19 +613,21 @@ public abstract class AbstractList extends AbstractCollection implements List
|
|||
|
||||
/**
|
||||
* This class follows the implementation requirements set forth in
|
||||
* {@link AbstractList#subList(int, int)}. Some compilers have problems
|
||||
* with AbstractList.this.modCount if this class is nested in AbstractList,
|
||||
* even though the JLS defines that to be legal, so we make it a top-level
|
||||
* class.
|
||||
* {@link AbstractList#subList(int, int)}. It matches Sun's implementation
|
||||
* by using a non-public top-level class in the same package.
|
||||
*
|
||||
* @author Original author unknown
|
||||
* @author Eric Blake <ebb9@email.byu.edu>
|
||||
*/
|
||||
class SubList extends AbstractList
|
||||
{
|
||||
private final AbstractList backingList;
|
||||
private final int offset;
|
||||
private int size;
|
||||
// Package visible, for use by iterator.
|
||||
/** The original list. */
|
||||
final AbstractList backingList;
|
||||
/** The index of the first element of the sublist. */
|
||||
final int offset;
|
||||
/** The size of the sublist. */
|
||||
int size;
|
||||
|
||||
/**
|
||||
* Construct the sublist.
|
||||
|
@ -647,8 +651,8 @@ class SubList extends AbstractList
|
|||
* @throws ConcurrentModificationException if the backing list has been
|
||||
* modified externally to this sublist
|
||||
*/
|
||||
// This will get inlined, since it is private.
|
||||
private void checkMod()
|
||||
// This can be inlined. Package visible, for use by iterator.
|
||||
void checkMod()
|
||||
{
|
||||
if (modCount != backingList.modCount)
|
||||
throw new ConcurrentModificationException();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue