harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r598623 [1/2] - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/
Date Tue, 27 Nov 2007 12:57:34 GMT
Author: tellison
Date: Tue Nov 27 04:57:31 2007
New Revision: 598623

URL: http://svn.apache.org/viewvc?rev=598623&view=rev
Log:
Code formatting (tabs -> spaces).

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractCollection.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractSequentialList.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collection.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Comparator.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ConcurrentModificationException.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Date.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Dictionary.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/DuplicateFormatFlagsException.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EmptyStackException.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Enumeration.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventListener.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventListenerProxy.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventObject.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Formattable.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormatterClosedException.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashSet.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatCodePointException.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractCollection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractCollection.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractCollection.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractCollection.java Tue Nov 27 04:57:31 2007
@@ -17,23 +17,23 @@
 
 package java.util;
 
-
 import java.lang.reflect.Array;
 
 /**
  * AbstractCollection is an abstract implementation of the Collection interface.
  * This implementation does not support adding. A subclass must implement the
  * abstract methods iterator() and size().
+ * 
  * @since 1.2
  */
 public abstract class AbstractCollection<E> implements Collection<E> {
 
-	/**
-	 * Constructs a new instance of this AbstractCollection.
-	 */
-	protected AbstractCollection() {
-		super();
-	}
+    /**
+     * Constructs a new instance of this AbstractCollection.
+     */
+    protected AbstractCollection() {
+        super();
+    }
 
     /**
      * If the specified element is not contained within this collection, and
@@ -53,319 +53,320 @@
      * @return true if the collection is changed successfully after invoking
      *         this method. Otherwise, false.
      * @throws UnsupportedOperationException
-     *                if add operation is not supported by this class.
+     *             if add operation is not supported by this class.
      * @throws NullPointerException
-     *                if null is used to invoke this method, and null is not
-     *                permitted by this collection.
+     *             if null is used to invoke this method, and null is not
+     *             permitted by this collection.
      * @throws ClassCastException
-     *                if the class type of the specified element is not
-     *                compatible with the permitted class type.
+     *             if the class type of the specified element is not compatible
+     *             with the permitted class type.
      * @throws IllegalArgumentException
-     *                if limitations of this collection prevent the specified
-     *                element from being added
+     *             if limitations of this collection prevent the specified
+     *             element from being added
+     */
+    public boolean add(E object) {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * Adds the objects in the specified Collection to this Collection.
+     * 
+     * @param collection
+     *            the Collection of objects
+     * @return true if this Collection is modified, false otherwise
+     * 
+     * @throws UnsupportedOperationException
+     *             when adding to this Collection is not supported
+     * @throws NullPointerException
+     *             if null is used to invoke this method
      */
-	public boolean add(E object) {
-		throw new UnsupportedOperationException();
-	}
-
-	/**
-	 * Adds the objects in the specified Collection to this Collection.
-	 * 
-	 * @param collection
-	 *            the Collection of objects
-	 * @return true if this Collection is modified, false otherwise
-	 * 
-	 * @throws UnsupportedOperationException
-	 *                when adding to this Collection is not supported
-	 * @throws NullPointerException
-	 *                if null is used to invoke this method
-	 */
-	public boolean addAll(Collection<? extends E> collection) {
-		boolean result = false;
-		Iterator<? extends E> it = collection.iterator();
-		while (it.hasNext()) {
+    public boolean addAll(Collection<? extends E> collection) {
+        boolean result = false;
+        Iterator<? extends E> it = collection.iterator();
+        while (it.hasNext()) {
             if (add(it.next())) {
                 result = true;
             }
         }
-		return result;
-	}
+        return result;
+    }
 
     /**
-     * Removes all the elements in this collection. This collection will be 
-     * cleared up after this operation. The operation iterates over the 
+     * Removes all the elements in this collection. This collection will be
+     * cleared up after this operation. The operation iterates over the
      * collection, removes every element using Iterator.remove method.
      * 
      * UnsupportedOperationException will be thrown out if the iterator returned
-     * by this collection does not implement the remove method and the collection
-     * is not zero length.
+     * by this collection does not implement the remove method and the
+     * collection is not zero length.
      * 
-     * @throws UnsupportedOperationException 
-     *                  if this operation is not implemented.
+     * @throws UnsupportedOperationException
+     *             if this operation is not implemented.
+     */
+    public void clear() {
+        Iterator<E> it = iterator();
+        while (it.hasNext()) {
+            it.next();
+            it.remove();
+        }
+    }
+
+    /**
+     * Searches this Collection for the specified object.
+     * 
+     * @param object
+     *            the object to search for
+     * @return true if <code>object</code> is an element of this Collection,
+     *         false otherwise
      */
-	public void clear() {
-		Iterator<E> it = iterator();
-		while (it.hasNext()) {
-			it.next();
-			it.remove();
-		}
-	}
-
-	/**
-	 * Searches this Collection for the specified object.
-	 * 
-	 * @param object
-	 *            the object to search for
-	 * @return true if <code>object</code> is an element of this Collection,
-	 *         false otherwise
-	 */
-	public boolean contains(Object object) {
-		Iterator<E> it = iterator();
-		if (object != null) {
-			while (it.hasNext()) {
+    public boolean contains(Object object) {
+        Iterator<E> it = iterator();
+        if (object != null) {
+            while (it.hasNext()) {
                 if (object.equals(it.next())) {
                     return true;
                 }
             }
-		} else {
-			while (it.hasNext()) {
+        } else {
+            while (it.hasNext()) {
                 if (it.next() == null) {
                     return true;
                 }
             }
-		}
-		return false;
-	}
-
-	/**
-	 * Searches this Collection for all objects in the specified Collection.
-	 * 
-	 * @param collection
-	 *            the Collection of objects
-	 * @return true if all objects in the specified Collection are elements of
-	 *         this Collection, false otherwise
+        }
+        return false;
+    }
+
+    /**
+     * Searches this Collection for all objects in the specified Collection.
+     * 
+     * @param collection
+     *            the Collection of objects
+     * @return true if all objects in the specified Collection are elements of
+     *         this Collection, false otherwise
      * @throws NullPointerException
-     *                if null is used to invoke this method
-	 */
-	public boolean containsAll(Collection<?> collection) {
-		Iterator<?> it = collection.iterator();
-		while (it.hasNext()) {
+     *             if null is used to invoke this method
+     */
+    public boolean containsAll(Collection<?> collection) {
+        Iterator<?> it = collection.iterator();
+        while (it.hasNext()) {
             if (!contains(it.next())) {
                 return false;
             }
         }
-		return true;
-	}
+        return true;
+    }
 
     /**
      * Returns true if the collection has no element, otherwise false.
      * 
      * @return true if the collection has no element.
      */
-	public boolean isEmpty() {
-		return size() == 0;
-	}
-
-	/**
-	 * Answers an Iterator on the elements of this Collection. A subclass must
-	 * implement the abstract methods iterator() and size().
-	 * 
-	 * @return an Iterator on the elements of this Collection
-	 * 
-	 * @see Iterator
-	 */
-	public abstract Iterator<E> iterator();
-
-	/**
-	 * Removes the first occurrence of the specified object from this
-	 * Collection. This operation traverses over the collection, looking
-     * for the specified object. Once the object is found, the object will
-     * be removed from the collection using the iterator's remove method. 
+    public boolean isEmpty() {
+        return size() == 0;
+    }
+
+    /**
+     * Answers an Iterator on the elements of this Collection. A subclass must
+     * implement the abstract methods iterator() and size().
+     * 
+     * @return an Iterator on the elements of this Collection
+     * 
+     * @see Iterator
+     */
+    public abstract Iterator<E> iterator();
+
+    /**
+     * Removes the first occurrence of the specified object from this
+     * Collection. This operation traverses over the collection, looking for the
+     * specified object. Once the object is found, the object will be removed
+     * from the collection using the iterator's remove method.
      * 
-     * This collection will throw an UnsupportedOperationException if the 
+     * This collection will throw an UnsupportedOperationException if the
      * iterator returned does not implement remove method, and the specified
      * object is in this collection.
-	 * 
-	 * @param object
-	 *            the object to remove
-	 * @return true if this Collection is modified, false otherwise
-	 * 
-	 * @throws UnsupportedOperationException
-	 *                when removing from this Collection is not supported
-	 */
-	public boolean remove(Object object) {
-		Iterator<?> it = iterator();
-		if (object != null) {
-			while (it.hasNext()) {
-				if (object.equals(it.next())) {
-					it.remove();
-					return true;
-				}
-			}
-		} else {
-			while (it.hasNext()) {
-				if (it.next() == null) {
-					it.remove();
-					return true;
-				}
-			}
-		}
-		return false;
-	}
-
-	/**
-	 * Removes all occurrences in this Collection of each object in the
-	 * specified Collection. This operation traverses over the collection
-     * itself, to verify whether each element is contained in the specified 
-     * collection. The object will be removed from the collection itself using 
-     * the iterator's remove method if it is contained in the specified 
-     * collection. 
-     * 
-     * This collection will throw an UnsupportedOperationException if the 
-     * iterator returned does not implement remove method, and the element 
-     * in the specified collection is contained in this collection.
-	 * 
-	 * @param collection
-	 *            the Collection of objects to remove
-	 * @return true if this Collection is modified, false otherwise
-	 * 
-	 * @throws UnsupportedOperationException
-	 *                when removing from this Collection is not supported
+     * 
+     * @param object
+     *            the object to remove
+     * @return true if this Collection is modified, false otherwise
+     * 
+     * @throws UnsupportedOperationException
+     *             when removing from this Collection is not supported
+     */
+    public boolean remove(Object object) {
+        Iterator<?> it = iterator();
+        if (object != null) {
+            while (it.hasNext()) {
+                if (object.equals(it.next())) {
+                    it.remove();
+                    return true;
+                }
+            }
+        } else {
+            while (it.hasNext()) {
+                if (it.next() == null) {
+                    it.remove();
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Removes all occurrences in this Collection of each object in the
+     * specified Collection. This operation traverses over the collection
+     * itself, to verify whether each element is contained in the specified
+     * collection. The object will be removed from the collection itself using
+     * the iterator's remove method if it is contained in the specified
+     * collection.
+     * 
+     * This collection will throw an UnsupportedOperationException if the
+     * iterator returned does not implement remove method, and the element in
+     * the specified collection is contained in this collection.
+     * 
+     * @param collection
+     *            the Collection of objects to remove
+     * @return true if this Collection is modified, false otherwise
+     * 
+     * @throws UnsupportedOperationException
+     *             when removing from this Collection is not supported
      * @throws NullPointerException
-     *                if null is used to invoke this method
-	 */
-	public boolean removeAll(Collection<?> collection) {
-		boolean result = false;
-		Iterator<?> it = iterator();
-		while (it.hasNext()) {
-			if (collection.contains(it.next())) {
-				it.remove();
-				result = true;
-			}
-		}
-		return result;
-	}
-
-	/**
-	 * Removes all objects from this Collection that are not contained in the
-	 * specified Collection. This operation traverses over the collection
-     * itself, to verify whether any element is contained in the specified 
-     * collection. The object will be removed from the collection itself using 
-     * the iterator's remove method if it is not contained in the specified 
-     * collection. 
+     *             if null is used to invoke this method
+     */
+    public boolean removeAll(Collection<?> collection) {
+        boolean result = false;
+        Iterator<?> it = iterator();
+        while (it.hasNext()) {
+            if (collection.contains(it.next())) {
+                it.remove();
+                result = true;
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Removes all objects from this Collection that are not contained in the
+     * specified Collection. This operation traverses over the collection
+     * itself, to verify whether any element is contained in the specified
+     * collection. The object will be removed from the collection itself using
+     * the iterator's remove method if it is not contained in the specified
+     * collection.
      * 
-     * This collection will throw an UnsupportedOperationException if the 
+     * This collection will throw an UnsupportedOperationException if the
      * iterator returned does not implement remove method, and the collection
-     * itself does contain elements which do not exist in the specified collection.
-	 * 
-	 * @param collection
-	 *            the Collection of objects to retain
-	 * @return true if this Collection is modified, false otherwise
-	 * 
-	 * @throws UnsupportedOperationException
-	 *                when removing from this Collection is not supported
+     * itself does contain elements which do not exist in the specified
+     * collection.
+     * 
+     * @param collection
+     *            the Collection of objects to retain
+     * @return true if this Collection is modified, false otherwise
+     * 
+     * @throws UnsupportedOperationException
+     *             when removing from this Collection is not supported
      * @throws NullPointerException
-     *                if null is used to invoke this method
-	 */
-	public boolean retainAll(Collection<?> collection) {
-		boolean result = false;
-		Iterator<?> it = iterator();
-		while (it.hasNext()) {
-			if (!collection.contains(it.next())) {
-				it.remove();
-				result = true;
-			}
-		}
-		return result;
-	}
-
-	/**
-	 * Answers the number of elements in this Collection.
-	 * 
-	 * @return the number of elements in this Collection
-	 */
-	public abstract int size();
+     *             if null is used to invoke this method
+     */
+    public boolean retainAll(Collection<?> collection) {
+        boolean result = false;
+        Iterator<?> it = iterator();
+        while (it.hasNext()) {
+            if (!collection.contains(it.next())) {
+                it.remove();
+                result = true;
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Answers the number of elements in this Collection.
+     * 
+     * @return the number of elements in this Collection
+     */
+    public abstract int size();
 
-	/**
-	 * Answers a new array containing all elements contained in this Collection.
+    /**
+     * Answers a new array containing all elements contained in this Collection.
      * All the elements in the array will not be referenced by the collection.
-     * The elements in the returned array will be sorted to the same order as 
-     * those returned by the iterator of this collection itself if the collection  
-     * guarantees the order. 
-	 * 
-	 * @return an array of the elements from this Collection
-	 */
-	public Object[] toArray() {
-		int size = size(), index = 0;
-		Iterator<?> it = iterator();
-		Object[] array = new Object[size];
-		while (index < size) {
+     * The elements in the returned array will be sorted to the same order as
+     * those returned by the iterator of this collection itself if the
+     * collection guarantees the order.
+     * 
+     * @return an array of the elements from this Collection
+     */
+    public Object[] toArray() {
+        int size = size(), index = 0;
+        Iterator<?> it = iterator();
+        Object[] array = new Object[size];
+        while (index < size) {
             array[index++] = it.next();
         }
-		return array;
-	}
+        return array;
+    }
 
-	/**
-	 * Answers an array containing all elements contained in this Collection. If
-	 * the specified array is large enough to hold the elements, the specified
-	 * array is used, otherwise an array of the same type is created. If the
-	 * specified array is used and is larger than this Collection, the array
-	 * element following the collection elements is set to null.
-	 * 
-	 * @param contents
-	 *            the array
-	 * @return an array of the elements from this Collection
-	 * 
-	 * @throws ArrayStoreException
-	 *                when the type of an element in this Collection cannot be
-	 *                stored in the type of the specified array
+    /**
+     * Answers an array containing all elements contained in this Collection. If
+     * the specified array is large enough to hold the elements, the specified
+     * array is used, otherwise an array of the same type is created. If the
+     * specified array is used and is larger than this Collection, the array
+     * element following the collection elements is set to null.
+     * 
+     * @param contents
+     *            the array
+     * @return an array of the elements from this Collection
+     * 
+     * @throws ArrayStoreException
+     *             when the type of an element in this Collection cannot be
+     *             stored in the type of the specified array
      * @throws NullPointerException
-     *                if null is used to invoke this method
-	 */
-	@SuppressWarnings("unchecked")
+     *             if null is used to invoke this method
+     */
+    @SuppressWarnings("unchecked")
     public <T> T[] toArray(T[] contents) {
-		int size = size(), index = 0;
-		if (size > contents.length) {
+        int size = size(), index = 0;
+        if (size > contents.length) {
             Class<?> ct = contents.getClass().getComponentType();
-			contents = (T[])Array.newInstance(ct, size);
+            contents = (T[]) Array.newInstance(ct, size);
         }
-		for (E entry: this) {
-			contents[index++] = (T)entry;
+        for (E entry : this) {
+            contents[index++] = (T) entry;
         }
-		if (index < contents.length) {
-			contents[index] = null;
+        if (index < contents.length) {
+            contents[index] = null;
         }
-		return contents;
-	}
+        return contents;
+    }
 
-	/**
-	 * Answers the string representation of this Collection. The presentation
+    /**
+     * Answers the string representation of this Collection. The presentation
      * has a specific format. It is enclosed by square brackets ("[]"). Elements
      * are separated by ', ' (comma and space).
-	 * 
-	 * @return the string representation of this Collection
-	 */
-	@Override
+     * 
+     * @return the string representation of this Collection
+     */
+    @Override
     public String toString() {
-		if (isEmpty()) {
+        if (isEmpty()) {
             return "[]"; //$NON-NLS-1$
         }
 
-		StringBuilder buffer = new StringBuilder(size() * 16);
-		buffer.append('[');
-		Iterator<?> it = iterator();
-		while (it.hasNext()) {
-			Object next = it.next();
-			if (next != this) {
-				buffer.append(next);
-			} else {
-				buffer.append("(this Collection)"); //$NON-NLS-1$
-			}
-            if(it.hasNext()) {
+        StringBuilder buffer = new StringBuilder(size() * 16);
+        buffer.append('[');
+        Iterator<?> it = iterator();
+        while (it.hasNext()) {
+            Object next = it.next();
+            if (next != this) {
+                buffer.append(next);
+            } else {
+                buffer.append("(this Collection)"); //$NON-NLS-1$
+            }
+            if (it.hasNext()) {
                 buffer.append(", "); //$NON-NLS-1$
             }
-		}
-		buffer.append(']');
-		return buffer.toString();
-	}
+        }
+        buffer.append(']');
+        return buffer.toString();
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractSequentialList.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractSequentialList.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractSequentialList.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractSequentialList.java Tue Nov 27 04:57:31 2007
@@ -17,182 +17,182 @@
 
 package java.util;
 
-
 /**
  * AbstractSequentialList is an abstract implementation of the List interface.
  * This implementation does not support adding. A subclass must implement the
  * abstract method listIterator().
+ * 
  * @since 1.2
  */
 public abstract class AbstractSequentialList<E> extends AbstractList<E> {
 
-	/**
-	 * Constructs a new instance of this AbstractSequentialList.
-	 */
-	protected AbstractSequentialList() {
-		super();
-	}
-
-	/**
-	 * Inserts the specified object into this List at the specified location.
-	 * The object is inserted before any previous element at the specified
-	 * location. If the location is equal to the size of this List, the object
-	 * is added at the end.
-	 * 
-	 * @param location
-	 *            the index at which to insert
-	 * @param object
-	 *            the object to add
-	 * 
-	 * @exception UnsupportedOperationException
-	 *                when adding to this List is not supported
-	 * @exception ClassCastException
-	 *                when the class of the object is inappropriate for this
-	 *                List
-	 * @exception IllegalArgumentException
-	 *                when the object cannot be added to this List
-	 * @exception IndexOutOfBoundsException
-	 *                when <code>location < 0 || >= size()</code>
-	 * @exception NullPointerException
-	 *                when the object is null and this List does not support
-	 *                null elements
-	 */
-	@Override
+    /**
+     * Constructs a new instance of this AbstractSequentialList.
+     */
+    protected AbstractSequentialList() {
+        super();
+    }
+
+    /**
+     * Inserts the specified object into this List at the specified location.
+     * The object is inserted before any previous element at the specified
+     * location. If the location is equal to the size of this List, the object
+     * is added at the end.
+     * 
+     * @param location
+     *            the index at which to insert
+     * @param object
+     *            the object to add
+     * 
+     * @exception UnsupportedOperationException
+     *                when adding to this List is not supported
+     * @exception ClassCastException
+     *                when the class of the object is inappropriate for this
+     *                List
+     * @exception IllegalArgumentException
+     *                when the object cannot be added to this List
+     * @exception IndexOutOfBoundsException
+     *                when <code>location < 0 || >= size()</code>
+     * @exception NullPointerException
+     *                when the object is null and this List does not support
+     *                null elements
+     */
+    @Override
     public void add(int location, E object) {
-		listIterator(location).add(object);
-	}
+        listIterator(location).add(object);
+    }
 
-	/**
-	 * Inserts the objects in the specified Collection at the specified location
-	 * in this List. The objects are added in the order they are returned from
-	 * the Collection iterator.
-	 * 
-	 * @param location
-	 *            the index at which to insert
-	 * @param collection
-	 *            the Collection of objects
-	 * @return true if this List is modified, false otherwise
-	 * 
-	 * @exception UnsupportedOperationException
-	 *                when adding to this List is not supported
-	 * @exception ClassCastException
-	 *                when the class of an object is inappropriate for this List
-	 * @exception IllegalArgumentException
-	 *                when an object cannot be added to this List
-	 * @exception IndexOutOfBoundsException
-	 *                when <code>location < 0 || >= size()</code>
-	 */
-	@Override
+    /**
+     * Inserts the objects in the specified Collection at the specified location
+     * in this List. The objects are added in the order they are returned from
+     * the Collection iterator.
+     * 
+     * @param location
+     *            the index at which to insert
+     * @param collection
+     *            the Collection of objects
+     * @return true if this List is modified, false otherwise
+     * 
+     * @exception UnsupportedOperationException
+     *                when adding to this List is not supported
+     * @exception ClassCastException
+     *                when the class of an object is inappropriate for this List
+     * @exception IllegalArgumentException
+     *                when an object cannot be added to this List
+     * @exception IndexOutOfBoundsException
+     *                when <code>location < 0 || >= size()</code>
+     */
+    @Override
     public boolean addAll(int location, Collection<? extends E> collection) {
-		ListIterator<E> it = listIterator(location);
-		Iterator<? extends E> colIt = collection.iterator();
-		int next = it.nextIndex();
-		while (colIt.hasNext()) {
-			it.add(colIt.next());
-		}
-		return next != it.nextIndex();
-	}
-
-	/**
-	 * Answers the element at the specified location in this List.
-	 * 
-	 * @param location
-	 *            the index of the element to return
-	 * @return the element at the specified location
-	 * 
-	 * @exception IndexOutOfBoundsException
-	 *                when <code>location < 0 || >= size()</code>
-	 */
-	@Override
+        ListIterator<E> it = listIterator(location);
+        Iterator<? extends E> colIt = collection.iterator();
+        int next = it.nextIndex();
+        while (colIt.hasNext()) {
+            it.add(colIt.next());
+        }
+        return next != it.nextIndex();
+    }
+
+    /**
+     * Answers the element at the specified location in this List.
+     * 
+     * @param location
+     *            the index of the element to return
+     * @return the element at the specified location
+     * 
+     * @exception IndexOutOfBoundsException
+     *                when <code>location < 0 || >= size()</code>
+     */
+    @Override
     public E get(int location) {
-		try {
-			return listIterator(location).next();
-		} catch (NoSuchElementException e) {
-			throw new IndexOutOfBoundsException();
-		}
-	}
-
-	/**
-	 * Answers an Iterator on the elements of this List. The elements are
-	 * iterated in the same order that they occur in the List.
-	 * 
-	 * @return an Iterator on the elements of this List
-	 * 
-	 * @see Iterator
-	 */
-	@Override
+        try {
+            return listIterator(location).next();
+        } catch (NoSuchElementException e) {
+            throw new IndexOutOfBoundsException();
+        }
+    }
+
+    /**
+     * Answers an Iterator on the elements of this List. The elements are
+     * iterated in the same order that they occur in the List.
+     * 
+     * @return an Iterator on the elements of this List
+     * 
+     * @see Iterator
+     */
+    @Override
     public Iterator<E> iterator() {
-		return listIterator(0);
-	}
+        return listIterator(0);
+    }
 
-	/**
-	 * Answers a ListIterator on the elements of this List. The elements are
-	 * iterated in the same order that they occur in the List. The iteration
-	 * starts at the specified location.
-	 * 
-	 * @param location
-	 *            the index at which to start the iteration
-	 * @return a ListIterator on the elements of this List
-	 * 
-	 * @exception IndexOutOfBoundsException
-	 *                when <code>location < 0 || >= size()</code>
-	 * 
-	 * @see ListIterator
-	 */
-	@Override
+    /**
+     * Answers a ListIterator on the elements of this List. The elements are
+     * iterated in the same order that they occur in the List. The iteration
+     * starts at the specified location.
+     * 
+     * @param location
+     *            the index at which to start the iteration
+     * @return a ListIterator on the elements of this List
+     * 
+     * @exception IndexOutOfBoundsException
+     *                when <code>location < 0 || >= size()</code>
+     * 
+     * @see ListIterator
+     */
+    @Override
     public abstract ListIterator<E> listIterator(int location);
 
-	/**
-	 * Removes the object at the specified location from this List.
-	 * 
-	 * @param location
-	 *            the index of the object to remove
-	 * @return the removed object
-	 * 
-	 * @exception UnsupportedOperationException
-	 *                when removing from this List is not supported
-	 * @exception IndexOutOfBoundsException
-	 *                when <code>location < 0 || >= size()</code>
-	 */
-	@Override
+    /**
+     * Removes the object at the specified location from this List.
+     * 
+     * @param location
+     *            the index of the object to remove
+     * @return the removed object
+     * 
+     * @exception UnsupportedOperationException
+     *                when removing from this List is not supported
+     * @exception IndexOutOfBoundsException
+     *                when <code>location < 0 || >= size()</code>
+     */
+    @Override
     public E remove(int location) {
-		try {
-			ListIterator<E> it = listIterator(location);
-			E result = it.next();
-			it.remove();
-			return result;
-		} catch (NoSuchElementException e) {
-			throw new IndexOutOfBoundsException();
-		}
-	}
-
-	/**
-	 * Replaces the element at the specified location in this List with the
-	 * specified object.
-	 * 
-	 * @param location
-	 *            the index at which to put the specified object
-	 * @param object
-	 *            the object to add
-	 * @return the previous element at the index
-	 * 
-	 * @exception UnsupportedOperationException
-	 *                when replacing elements in this List is not supported
-	 * @exception ClassCastException
-	 *                when the class of an object is inappropriate for this List
-	 * @exception IllegalArgumentException
-	 *                when an object cannot be added to this List
-	 * @exception IndexOutOfBoundsException
-	 *                when <code>location < 0 || >= size()</code>
-	 */
-	@Override
+        try {
+            ListIterator<E> it = listIterator(location);
+            E result = it.next();
+            it.remove();
+            return result;
+        } catch (NoSuchElementException e) {
+            throw new IndexOutOfBoundsException();
+        }
+    }
+
+    /**
+     * Replaces the element at the specified location in this List with the
+     * specified object.
+     * 
+     * @param location
+     *            the index at which to put the specified object
+     * @param object
+     *            the object to add
+     * @return the previous element at the index
+     * 
+     * @exception UnsupportedOperationException
+     *                when replacing elements in this List is not supported
+     * @exception ClassCastException
+     *                when the class of an object is inappropriate for this List
+     * @exception IllegalArgumentException
+     *                when an object cannot be added to this List
+     * @exception IndexOutOfBoundsException
+     *                when <code>location < 0 || >= size()</code>
+     */
+    @Override
     public E set(int location, E object) {
-		ListIterator<E> it = listIterator(location);
-		if (!it.hasNext()){
-			throw new IndexOutOfBoundsException();
-		}
-		E result = it.next();
-		it.set(object);
-		return result;
-	}
+        ListIterator<E> it = listIterator(location);
+        if (!it.hasNext()) {
+            throw new IndexOutOfBoundsException();
+        }
+        E result = it.next();
+        it.set(object);
+        return result;
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collection.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collection.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collection.java Tue Nov 27 04:57:31 2007
@@ -17,185 +17,184 @@
 
 package java.util;
 
-
 /**
  * Collection is the root of the collection hierarchy.
  */
 public interface Collection<E> extends Iterable<E> {
 
-	/**
-	 * Attempts to add <code>object</code> to the contents of this
-	 * <code>Collection</code>.
-	 * 
-	 * @param object
-	 *            the object to add
-	 * @return <code>true</code> if this <code>Collection</code> is
-	 *         modified, <code>false</code> otherwise
-	 * 
-	 * @exception UnsupportedOperationException
-	 *                when adding to this Collection is not supported
-	 * @exception ClassCastException
-	 *                when the class of the object is inappropriate for this
-	 *                Collection
-	 * @exception IllegalArgumentException
-	 *                when the object cannot be added to this Collection
-	 */
-	public boolean add(E object);
-
-	/**
-	 * Attempts to add all of the objects contained in <code>collection</code>
-	 * to the contents of this collection.
-	 * 
-	 * @param collection
-	 *            the Collection of objects
-	 * @return true if this Collection is modified, false otherwise
-	 * 
-	 * @exception UnsupportedOperationException
-	 *                when adding to this Collection is not supported
-	 * @exception ClassCastException
-	 *                when the class of an object is inappropriate for this
-	 *                Collection
-	 * @exception IllegalArgumentException
-	 *                when an object cannot be added to this Collection
-	 */
-	public boolean addAll(Collection<? extends E> collection);
-
-	/**
-	 * Removes all elements from this Collection, leaving it empty.
-	 * 
-	 * @exception UnsupportedOperationException
-	 *                when removing from this Collection is not supported
-	 * 
-	 * @see #isEmpty
-	 * @see #size
-	 */
-	public void clear();
-
-	/**
-	 * Searches this Collection for the specified object.
-	 * 
-	 * @param object
-	 *            the object to search for
-	 * @return true if object is an element of this Collection, false otherwise
-	 */
-	public boolean contains(Object object);
-
-	/**
-	 * Searches this Collection for all objects in the specified Collection.
-	 * 
-	 * @param collection
-	 *            the Collection of objects
-	 * @return true if all objects in the specified Collection are elements of
-	 *         this Collection, false otherwise
-	 */
-	public boolean containsAll(Collection<?> collection);
-
-	/**
-	 * Compares the argument to the receiver, and answers true if they represent
-	 * the <em>same</em> object using a class specific comparison.
-	 * 
-	 * @param object
-	 *            Object the object to compare with this object.
-	 * @return boolean <code>true</code> if the object is the same as this
-	 *         object <code>false</code> if it is different from this object.
-	 * @see #hashCode
-	 */
-	public boolean equals(Object object);
-
-	/**
-	 * Answers an integer hash code for the receiver. Objects which are equal
-	 * answer the same value for this method.
-	 * 
-	 * @return the receiver's hash
-	 * 
-	 * @see #equals
-	 */
-	public int hashCode();
-
-	/**
-	 * Answers if this Collection has no elements, a size of zero.
-	 * 
-	 * @return true if this Collection has no elements, false otherwise
-	 * 
-	 * @see #size
-	 */
-	public boolean isEmpty();
-
-	/**
-	 * Returns an instance of {@link Iterator} that may be used to access the
-	 * objects contained by this collection.
-	 * 
-	 * @return an iterator for accessing the collection contents
-	 */
-	public Iterator<E> iterator();
-
-	/**
-	 * Removes the first occurrence of the specified object from this
-	 * Collection.
-	 * 
-	 * @param object
-	 *            the object to remove
-	 * @return true if this Collection is modified, false otherwise
-	 * 
-	 * @exception UnsupportedOperationException
-	 *                when removing from this Collection is not supported
-	 */
-	public boolean remove(Object object);
-
-	/**
-	 * Removes all occurrences in this Collection of each object in the
-	 * specified Collection.
-	 * 
-	 * @param collection
-	 *            the Collection of objects to remove
-	 * @return true if this Collection is modified, false otherwise
-	 * 
-	 * @exception UnsupportedOperationException
-	 *                when removing from this Collection is not supported
-	 */
-	public boolean removeAll(Collection<?> collection);
-
-	/**
-	 * Removes all objects from this Collection that are not also found in the
-	 * contents of <code>collection</code>.
-	 * 
-	 * @param collection
-	 *            the Collection of objects to retain
-	 * @return true if this Collection is modified, false otherwise
-	 * 
-	 * @exception UnsupportedOperationException
-	 *                when removing from this Collection is not supported
-	 */
-	public boolean retainAll(Collection<?> collection);
-
-	/**
-	 * Returns a count of how many objects are contained by this collection.
-	 * 
-	 * @return how many objects are contained by this collection
-	 */
-	public int size();
-
-	/**
-	 * Answers a new array containing all elements contained in this Collection.
-	 * 
-	 * @return an array of the elements from this Collection
-	 */
-	public Object[] toArray();
-
-	/**
-	 * Answers an array containing all elements contained in this Collection. If
-	 * the specified array is large enough to hold the elements, the specified
-	 * array is used, otherwise an array of the same type is created. If the
-	 * specified array is used and is larger than this Collection, the array
-	 * element following the collection elements is set to null.
-	 * 
-	 * @param array
-	 *            the array
-	 * @return an array of the elements from this Collection
-	 * 
-	 * @exception ArrayStoreException
-	 *                when the type of an element in this Collection cannot be
-	 *                stored in the type of the specified array
-	 */
-	public <T> T[] toArray(T[] array);
+    /**
+     * Attempts to add <code>object</code> to the contents of this
+     * <code>Collection</code>.
+     * 
+     * @param object
+     *            the object to add
+     * @return <code>true</code> if this <code>Collection</code> is
+     *         modified, <code>false</code> otherwise
+     * 
+     * @exception UnsupportedOperationException
+     *                when adding to this Collection is not supported
+     * @exception ClassCastException
+     *                when the class of the object is inappropriate for this
+     *                Collection
+     * @exception IllegalArgumentException
+     *                when the object cannot be added to this Collection
+     */
+    public boolean add(E object);
+
+    /**
+     * Attempts to add all of the objects contained in <code>collection</code>
+     * to the contents of this collection.
+     * 
+     * @param collection
+     *            the Collection of objects
+     * @return true if this Collection is modified, false otherwise
+     * 
+     * @exception UnsupportedOperationException
+     *                when adding to this Collection is not supported
+     * @exception ClassCastException
+     *                when the class of an object is inappropriate for this
+     *                Collection
+     * @exception IllegalArgumentException
+     *                when an object cannot be added to this Collection
+     */
+    public boolean addAll(Collection<? extends E> collection);
+
+    /**
+     * Removes all elements from this Collection, leaving it empty.
+     * 
+     * @exception UnsupportedOperationException
+     *                when removing from this Collection is not supported
+     * 
+     * @see #isEmpty
+     * @see #size
+     */
+    public void clear();
+
+    /**
+     * Searches this Collection for the specified object.
+     * 
+     * @param object
+     *            the object to search for
+     * @return true if object is an element of this Collection, false otherwise
+     */
+    public boolean contains(Object object);
+
+    /**
+     * Searches this Collection for all objects in the specified Collection.
+     * 
+     * @param collection
+     *            the Collection of objects
+     * @return true if all objects in the specified Collection are elements of
+     *         this Collection, false otherwise
+     */
+    public boolean containsAll(Collection<?> collection);
+
+    /**
+     * Compares the argument to the receiver, and answers true if they represent
+     * the <em>same</em> object using a class specific comparison.
+     * 
+     * @param object
+     *            Object the object to compare with this object.
+     * @return boolean <code>true</code> if the object is the same as this
+     *         object <code>false</code> if it is different from this object.
+     * @see #hashCode
+     */
+    public boolean equals(Object object);
+
+    /**
+     * Answers an integer hash code for the receiver. Objects which are equal
+     * answer the same value for this method.
+     * 
+     * @return the receiver's hash
+     * 
+     * @see #equals
+     */
+    public int hashCode();
+
+    /**
+     * Answers if this Collection has no elements, a size of zero.
+     * 
+     * @return true if this Collection has no elements, false otherwise
+     * 
+     * @see #size
+     */
+    public boolean isEmpty();
+
+    /**
+     * Returns an instance of {@link Iterator} that may be used to access the
+     * objects contained by this collection.
+     * 
+     * @return an iterator for accessing the collection contents
+     */
+    public Iterator<E> iterator();
+
+    /**
+     * Removes the first occurrence of the specified object from this
+     * Collection.
+     * 
+     * @param object
+     *            the object to remove
+     * @return true if this Collection is modified, false otherwise
+     * 
+     * @exception UnsupportedOperationException
+     *                when removing from this Collection is not supported
+     */
+    public boolean remove(Object object);
+
+    /**
+     * Removes all occurrences in this Collection of each object in the
+     * specified Collection.
+     * 
+     * @param collection
+     *            the Collection of objects to remove
+     * @return true if this Collection is modified, false otherwise
+     * 
+     * @exception UnsupportedOperationException
+     *                when removing from this Collection is not supported
+     */
+    public boolean removeAll(Collection<?> collection);
+
+    /**
+     * Removes all objects from this Collection that are not also found in the
+     * contents of <code>collection</code>.
+     * 
+     * @param collection
+     *            the Collection of objects to retain
+     * @return true if this Collection is modified, false otherwise
+     * 
+     * @exception UnsupportedOperationException
+     *                when removing from this Collection is not supported
+     */
+    public boolean retainAll(Collection<?> collection);
+
+    /**
+     * Returns a count of how many objects are contained by this collection.
+     * 
+     * @return how many objects are contained by this collection
+     */
+    public int size();
+
+    /**
+     * Answers a new array containing all elements contained in this Collection.
+     * 
+     * @return an array of the elements from this Collection
+     */
+    public Object[] toArray();
+
+    /**
+     * Answers an array containing all elements contained in this Collection. If
+     * the specified array is large enough to hold the elements, the specified
+     * array is used, otherwise an array of the same type is created. If the
+     * specified array is used and is larger than this Collection, the array
+     * element following the collection elements is set to null.
+     * 
+     * @param array
+     *            the array
+     * @return an array of the elements from this Collection
+     * 
+     * @exception ArrayStoreException
+     *                when the type of an element in this Collection cannot be
+     *                stored in the type of the specified array
+     */
+    public <T> T[] toArray(T[] array);
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Comparator.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Comparator.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Comparator.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Comparator.java Tue Nov 27 04:57:31 2007
@@ -24,30 +24,30 @@
  * @since 1.2
  */
 public interface Comparator<T> {
-	/**
-	 * Compare the two objects to determine the relative ordering.
-	 * 
-	 * @param object1
-	 *            an Object to compare
-	 * @param object2
-	 *            an Object to compare
-	 * @return an int < 0 if object1 is less than object2, 0 if they are equal,
-	 *         and > 0 if object1 is greater
-	 * 
-	 * @exception ClassCastException
-	 *                when objects are not the correct type
-	 */
-	public int compare(T object1, T object2);
+    /**
+     * Compare the two objects to determine the relative ordering.
+     * 
+     * @param object1
+     *            an Object to compare
+     * @param object2
+     *            an Object to compare
+     * @return an int < 0 if object1 is less than object2, 0 if they are equal,
+     *         and > 0 if object1 is greater
+     * 
+     * @exception ClassCastException
+     *                when objects are not the correct type
+     */
+    public int compare(T object1, T object2);
 
-	/**
-	 * Compares the argument to the receiver, and answers true if they represent
-	 * the <em>same</em> object using a class specific comparison.
-	 * 
-	 * @param object
-	 *            Object the object to compare with this object.
-	 * @return boolean <code>true</code> if the object is the same as this
-	 *         object <code>false</code> if it is different from this object.
-	 * @see Object#hashCode
-	 */
-	public boolean equals(Object object);
+    /**
+     * Compares the argument to the receiver, and answers true if they represent
+     * the <em>same</em> object using a class specific comparison.
+     * 
+     * @param object
+     *            Object the object to compare with this object.
+     * @return boolean <code>true</code> if the object is the same as this
+     *         object <code>false</code> if it is different from this object.
+     * @see Object#hashCode
+     */
+    public boolean equals(Object object);
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ConcurrentModificationException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ConcurrentModificationException.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ConcurrentModificationException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ConcurrentModificationException.java Tue Nov 27 04:57:31 2007
@@ -17,7 +17,6 @@
 
 package java.util;
 
-
 /**
  * This runtime exception is thrown when a Collection is modified and an
  * existing iterator on the Collection is used to modify the Collection as well.
@@ -26,24 +25,23 @@
  */
 public class ConcurrentModificationException extends RuntimeException {
 
-	private static final long serialVersionUID = -3666751008965953603L;
-
-	/**
-	 * Constructs a new instance of this class with its walkback filled in.
-	 */
-	public ConcurrentModificationException() {
-		/*empty*/
-	}
+    private static final long serialVersionUID = -3666751008965953603L;
 
-	/**
-	 * Constructs a new instance of this class with its walkback and message
-	 * filled in.
-	 * 
-	 * @param detailMessage
-	 *            String The detail message for the exception.
-	 */
-	public ConcurrentModificationException(String detailMessage) {
-		super(detailMessage);
-	}
+    /**
+     * Constructs a new instance of this class with its walkback filled in.
+     */
+    public ConcurrentModificationException() {
+        /* empty */
+    }
 
+    /**
+     * Constructs a new instance of this class with its walkback and message
+     * filled in.
+     * 
+     * @param detailMessage
+     *            String The detail message for the exception.
+     */
+    public ConcurrentModificationException(String detailMessage) {
+        super(detailMessage);
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Date.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Date.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Date.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Date.java Tue Nov 27 04:57:31 2007
@@ -378,7 +378,7 @@
         int commentLevel = 0;
         int offset = 0, length = string.length(), state = 0;
         int year = -1, month = -1, date = -1;
-        int hour = -1, minute = -1, second = -1, zoneOffset = 0, minutesOffset =0;
+        int hour = -1, minute = -1, second = -1, zoneOffset = 0, minutesOffset = 0;
         boolean zone = false;
         final int PAD = 0, LETTERS = 1, NUMBERS = 2;
         StringBuffer buffer = new StringBuffer();

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Dictionary.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Dictionary.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Dictionary.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Dictionary.java Tue Nov 27 04:57:31 2007
@@ -17,7 +17,6 @@
 
 package java.util;
 
-
 /**
  * Dictionary is a abstract class which is the superclass of all classes that
  * associate keys with values, such as Hashtable.
@@ -25,99 +24,99 @@
  * @see Hashtable
  * @since 1.0
  */
-public abstract class Dictionary<K,V> {
-	/**
-	 * Constructs a new instance of this class.
-	 * 
-	 */
-	public Dictionary() {
-		super();
-	}
-
-	/**
-	 * Answers an Enumeration on the elements of this Dictionary.
-	 * 
-	 * @return an Enumeration of the values of this Dictionary
-	 * 
-	 * @see #keys
-	 * @see #size
-	 * @see Enumeration
-	 */
-	public abstract Enumeration<V> elements();
-
-	/**
-	 * Answers the value associated with <code>key</code>.
-	 * 
-	 * @param key
-	 *            the key of the value returned
-	 * @return the value associated with <code>key</code> or <code>null</code>
-	 *         if the specified key does not exist
-	 * 
-	 * @see #put
-	 */
-	public abstract V get(Object key);
-
-	/**
-	 * Answers if this Dictionary has no key/value pairs, a size of zero.
-	 * 
-	 * @return true if this Dictionary has no key/value pairs, false otherwise
-	 * 
-	 * @see #size
-	 */
-	public abstract boolean isEmpty();
-
-	/**
-	 * Answers an Enumeration on the keys of this Dictionary.
-	 * 
-	 * @return an Enumeration of the keys of this Dictionary
-	 * 
-	 * @see #elements
-	 * @see #size
-	 * @see Enumeration
-	 */
-	public abstract Enumeration<K> keys();
-
-	/**
-	 * Associate <code>key</code> with <code>value</code> in this
-	 * <code>Dictionary</code>. If <code>key</code> exists in the
-	 * <code>Dictionary</code> prior to this call being made, the old value is
-	 * replaced.
-	 * 
-	 * @param key
-	 *            the key to add
-	 * @param value
-	 *            the value to add
-	 * @return the old value previously associated with <code>key</code> or
-	 *         <code>null</code> if <code>key</code> is new to the
-	 *         <code>Dictionary</code>.
-	 * 
-	 * @see #elements
-	 * @see #get
-	 * @see #keys
-	 */
-	public abstract V put(K key, V value);
-
-	/**
-	 * Remove the key/value pair with the specified <code>key</code> from this
-	 * <code>Dictionary</code>.
-	 * 
-	 * @param key
-	 *            the key to remove
-	 * @return the associated value or else <code>null</code> if
-	 *         <code>key</code> is not known to this <code>Dictionary</code>
-	 * 
-	 * @see #get
-	 * @see #put
-	 */
-	public abstract V remove(Object key);
-
-	/**
-	 * Answers the number of key/value pairs in this Dictionary.
-	 * 
-	 * @return the number of key/value pairs in this Dictionary
-	 * 
-	 * @see #elements
-	 * @see #keys
-	 */
-	public abstract int size();
+public abstract class Dictionary<K, V> {
+    /**
+     * Constructs a new instance of this class.
+     * 
+     */
+    public Dictionary() {
+        super();
+    }
+
+    /**
+     * Answers an Enumeration on the elements of this Dictionary.
+     * 
+     * @return an Enumeration of the values of this Dictionary
+     * 
+     * @see #keys
+     * @see #size
+     * @see Enumeration
+     */
+    public abstract Enumeration<V> elements();
+
+    /**
+     * Answers the value associated with <code>key</code>.
+     * 
+     * @param key
+     *            the key of the value returned
+     * @return the value associated with <code>key</code> or <code>null</code>
+     *         if the specified key does not exist
+     * 
+     * @see #put
+     */
+    public abstract V get(Object key);
+
+    /**
+     * Answers if this Dictionary has no key/value pairs, a size of zero.
+     * 
+     * @return true if this Dictionary has no key/value pairs, false otherwise
+     * 
+     * @see #size
+     */
+    public abstract boolean isEmpty();
+
+    /**
+     * Answers an Enumeration on the keys of this Dictionary.
+     * 
+     * @return an Enumeration of the keys of this Dictionary
+     * 
+     * @see #elements
+     * @see #size
+     * @see Enumeration
+     */
+    public abstract Enumeration<K> keys();
+
+    /**
+     * Associate <code>key</code> with <code>value</code> in this
+     * <code>Dictionary</code>. If <code>key</code> exists in the
+     * <code>Dictionary</code> prior to this call being made, the old value is
+     * replaced.
+     * 
+     * @param key
+     *            the key to add
+     * @param value
+     *            the value to add
+     * @return the old value previously associated with <code>key</code> or
+     *         <code>null</code> if <code>key</code> is new to the
+     *         <code>Dictionary</code>.
+     * 
+     * @see #elements
+     * @see #get
+     * @see #keys
+     */
+    public abstract V put(K key, V value);
+
+    /**
+     * Remove the key/value pair with the specified <code>key</code> from this
+     * <code>Dictionary</code>.
+     * 
+     * @param key
+     *            the key to remove
+     * @return the associated value or else <code>null</code> if
+     *         <code>key</code> is not known to this <code>Dictionary</code>
+     * 
+     * @see #get
+     * @see #put
+     */
+    public abstract V remove(Object key);
+
+    /**
+     * Answers the number of key/value pairs in this Dictionary.
+     * 
+     * @return the number of key/value pairs in this Dictionary
+     * 
+     * @see #elements
+     * @see #keys
+     */
+    public abstract int size();
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/DuplicateFormatFlagsException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/DuplicateFormatFlagsException.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/DuplicateFormatFlagsException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/DuplicateFormatFlagsException.java Tue Nov 27 04:57:31 2007
@@ -21,44 +21,45 @@
  * out in the format specifier.
  */
 public class DuplicateFormatFlagsException extends IllegalFormatException {
-    
-	private static final long serialVersionUID = 18890531L;
 
-	private String flags;
+    private static final long serialVersionUID = 18890531L;
 
-	/**
+    private String flags;
+
+    /**
      * Constructs a DuplicateFormatFlagsException which flags is specified.
      * 
-     * @param f The format flags that contain a duplicate flag.
+     * @param f
+     *            The format flags that contain a duplicate flag.
      */
-	public DuplicateFormatFlagsException(String f) {
-		if (null == f) {
-			throw new NullPointerException();
-		}
-		flags = f;
-	}
+    public DuplicateFormatFlagsException(String f) {
+        if (null == f) {
+            throw new NullPointerException();
+        }
+        flags = f;
+    }
 
-	/**
-	 * Returns the format flags that contain a duplicate flag.
-	 * 
-	 * @return The format flags that contain a duplicate flag.
-	 */
-	public String getFlags() {
-		return flags;
-	}
+    /**
+     * Returns the format flags that contain a duplicate flag.
+     * 
+     * @return The format flags that contain a duplicate flag.
+     */
+    public String getFlags() {
+        return flags;
+    }
 
-	/**
-	 * Returns the message string of the DuplicateFormatFlagsException.
-	 * 
-	 * @return The message string of the DuplicateFormatFlagsException.
-	 */
-	@Override
+    /**
+     * Returns the message string of the DuplicateFormatFlagsException.
+     * 
+     * @return The message string of the DuplicateFormatFlagsException.
+     */
+    @Override
     public String getMessage() {
-		StringBuilder buffer = new StringBuilder();
-		buffer.append("Flags of the DuplicateFormatFlagsException is'");
-		buffer.append(flags);
-		buffer.append("'");
-		return buffer.toString();
-	}
+        StringBuilder buffer = new StringBuilder();
+        buffer.append("Flags of the DuplicateFormatFlagsException is'");
+        buffer.append(flags);
+        buffer.append("'");
+        return buffer.toString();
+    }
 
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EmptyStackException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EmptyStackException.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EmptyStackException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EmptyStackException.java Tue Nov 27 04:57:31 2007
@@ -17,19 +17,18 @@
 
 package java.util;
 
-
 /**
  * Runtime exception which is thrown when pop/peek method of stack is executed
  * on a stack which is empty
  */
 public class EmptyStackException extends RuntimeException {
 
-	private static final long serialVersionUID = 5084686378493302095L;
+    private static final long serialVersionUID = 5084686378493302095L;
 
-	/**
-	 * Constructs a new instance of this class with its walkback filled in.
-	 */
-	public EmptyStackException() {
-		super();
-	}
+    /**
+     * Constructs a new instance of this class with its walkback filled in.
+     */
+    public EmptyStackException() {
+        super();
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Enumeration.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Enumeration.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Enumeration.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Enumeration.java Tue Nov 27 04:57:31 2007
@@ -17,7 +17,6 @@
 
 package java.util;
 
-
 /**
  * An Enumeration is used to sequence over a collection of objects.
  * 
@@ -27,24 +26,24 @@
  * @version 1.0
  */
 public interface Enumeration<E> {
-	/**
-	 * Answers if this Enumeration has more elements.
-	 * 
-	 * @return true if there are more elements, false otherwise
-	 * 
-	 * @see #nextElement
-	 */
-	public boolean hasMoreElements();
+    /**
+     * Answers if this Enumeration has more elements.
+     * 
+     * @return true if there are more elements, false otherwise
+     * 
+     * @see #nextElement
+     */
+    public boolean hasMoreElements();
 
-	/**
-	 * Answers the next element in this Enumeration.
-	 * 
-	 * @return the next element in this Enumeration
-	 * 
-	 * @exception NoSuchElementException
-	 *                when there are no more elements
-	 * 
-	 * @see #hasMoreElements
-	 */
-	public E nextElement();
+    /**
+     * Answers the next element in this Enumeration.
+     * 
+     * @return the next element in this Enumeration
+     * 
+     * @exception NoSuchElementException
+     *                when there are no more elements
+     * 
+     * @see #hasMoreElements
+     */
+    public E nextElement();
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventListener.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventListener.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventListener.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventListener.java Tue Nov 27 04:57:31 2007
@@ -17,12 +17,11 @@
 
 package java.util;
 
-
 /**
  * EventListener is the superclass of all event listener interfaces.
- *
- * @see			EventObject
+ * 
+ * @see EventObject
  */
 public interface EventListener {
-	/*empty*/
+    /* empty */
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventListenerProxy.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventListenerProxy.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventListenerProxy.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventListenerProxy.java Tue Nov 27 04:57:31 2007
@@ -17,24 +17,23 @@
 
 package java.util;
 
-
 /**
  * This abstract class provides a simple wrapper to types of EventListener.
  * 
  */
 public abstract class EventListenerProxy implements EventListener {
 
-	private final EventListener listener;
+    private final EventListener listener;
 
-	/**
-	 * @param listener
-	 */
-	public EventListenerProxy(EventListener listener) {
-		super();
-		this.listener = listener;
-	}
+    /**
+     * @param listener
+     */
+    public EventListenerProxy(EventListener listener) {
+        super();
+        this.listener = listener;
+    }
 
-	public EventListener getListener() {
-		return listener;
-	}
+    public EventListener getListener() {
+        return listener;
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventObject.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventObject.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventObject.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventObject.java Tue Nov 27 04:57:31 2007
@@ -17,7 +17,6 @@
 
 package java.util;
 
-
 import java.io.Serializable;
 
 /**
@@ -27,44 +26,44 @@
  * @see EventListener
  */
 public class EventObject implements Serializable {
-	
-	private static final long serialVersionUID = 5516075349620653480L;
 
-	/**
-	 * The event source.
-	 */
-	protected transient Object source;
-
-	/**
-	 * Constructs a new instance of this class.
-	 * 
-	 * @param source
-	 *            the object which fired the event
-	 */
-	public EventObject(Object source) {
-		if (source != null) {
+    private static final long serialVersionUID = 5516075349620653480L;
+
+    /**
+     * The event source.
+     */
+    protected transient Object source;
+
+    /**
+     * Constructs a new instance of this class.
+     * 
+     * @param source
+     *            the object which fired the event
+     */
+    public EventObject(Object source) {
+        if (source != null) {
             this.source = source;
         } else {
             throw new IllegalArgumentException();
         }
-	}
+    }
 
-	/**
-	 * Answers the event source.
-	 * 
-	 * @return the object which fired the event
-	 */
-	public Object getSource() {
-		return source;
-	}
-
-	/**
-	 * Answers the string representation of this EventObject.
-	 * 
-	 * @return the string representation of this EventObject
-	 */
-	@Override
+    /**
+     * Answers the event source.
+     * 
+     * @return the object which fired the event
+     */
+    public Object getSource() {
+        return source;
+    }
+
+    /**
+     * Answers the string representation of this EventObject.
+     * 
+     * @return the string representation of this EventObject
+     */
+    @Override
     public String toString() {
-		return getClass().getName() + "[source=" + source + ']'; //$NON-NLS-1$
-	}
+        return getClass().getName() + "[source=" + source + ']'; //$NON-NLS-1$
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java Tue Nov 27 04:57:31 2007
@@ -23,61 +23,61 @@
  * incompatible.
  */
 public class FormatFlagsConversionMismatchException extends
-		IllegalFormatException implements Serializable {
+        IllegalFormatException implements Serializable {
 
-	private static final long serialVersionUID = 19120414L;
+    private static final long serialVersionUID = 19120414L;
 
-	private String f;
+    private String f;
 
-	private char c;
+    private char c;
 
-	/**
-	 * Construct a FormatFlagsConversionMismatchException with the flags and
-	 * conversion specified.
-	 * 
-	 * @param f
-	 *            The flags
-	 * @param c
-	 *            The conversion
-	 */
-	public FormatFlagsConversionMismatchException(String f, char c) {
-		if (null == f) {
-			throw new NullPointerException();
-		}
-		this.f = f;
-		this.c = c;
-	}
-
-	/**
-	 * Returns the incompatible format flag.
-	 * 
-	 * @return The incompatible format flag.
-	 */
-	public String getFlags() {
-		return f;
-	}
-
-	/**
-	 * Returns the incompatible Conversion.
-	 * 
-	 * @return The incompatible Conversion.
-	 */
-	public char getConversion() {
-		return c;
-	}
-
-	/**
-	 * Returns the message string of the FormatFlagsConversionMismatchException.
-	 * 
-	 * @return The message string of the FormatFlagsConversionMismatchException.
-	 */
-	@Override
+    /**
+     * Construct a FormatFlagsConversionMismatchException with the flags and
+     * conversion specified.
+     * 
+     * @param f
+     *            The flags
+     * @param c
+     *            The conversion
+     */
+    public FormatFlagsConversionMismatchException(String f, char c) {
+        if (null == f) {
+            throw new NullPointerException();
+        }
+        this.f = f;
+        this.c = c;
+    }
+
+    /**
+     * Returns the incompatible format flag.
+     * 
+     * @return The incompatible format flag.
+     */
+    public String getFlags() {
+        return f;
+    }
+
+    /**
+     * Returns the incompatible Conversion.
+     * 
+     * @return The incompatible Conversion.
+     */
+    public char getConversion() {
+        return c;
+    }
+
+    /**
+     * Returns the message string of the FormatFlagsConversionMismatchException.
+     * 
+     * @return The message string of the FormatFlagsConversionMismatchException.
+     */
+    @Override
     public String getMessage() {
-		StringBuilder buffer = new StringBuilder();
-		buffer.append("Mismatched Convertor =");
-		buffer.append(c);
-		buffer.append(", Flags= ");
-		buffer.append(f);
-		return buffer.toString();
-	}
+        StringBuilder buffer = new StringBuilder();
+        buffer.append("Mismatched Convertor =");
+        buffer.append(c);
+        buffer.append(", Flags= ");
+        buffer.append(f);
+        return buffer.toString();
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Formattable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Formattable.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Formattable.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Formattable.java Tue Nov 27 04:57:31 2007
@@ -24,34 +24,34 @@
 
 public interface Formattable {
 
-	/**
-	 * Formats the object using the specified formatter.
-	 * 
-	 * @param formatter
-	 *            The formatter to use in the formatTo.
-	 * @param flags
-	 *            The flags applied to the output format, which is a bitmask
-	 *            that is any combination of FormattableFlags.LEFT_JUSTIFY,
-	 *            FormattableFlags.UPPERCASE, and FormattableFlags.ALTERNATE. If
-	 *            no such flag is set, the output is formatted by the default
-	 *            formatting of the implementation of the interface.
-	 * @param width
-	 *            The minimum number of characters that should be written to the
-	 *            output. Additional space ' ' is added to the output if the
-	 *            length of the converted value is less than the width until the
-	 *            length equals the width. These spaces are added at the
-	 *            beginning by default unless the flag
-	 *            FormattableFlags.LEFT_JUSTIFY is set, which denotes that
-	 *            padding should be added at the end. If width is -1, then no
-	 *            minimum requirement.
-	 * @param precision
-	 *            The maximum number of characters that can be written to the
-	 *            output. The procedure to trunk the output according to the
-	 *            precision is invoked before that of padding to width. If the
-	 *            precision is -1, then no maximum requirement.
-	 * @throws IllegalFormatException
-	 *             If any of the parameters is not supported.
-	 */
-	void formatTo(Formatter formatter, int flags, int width, int precision)
-			throws IllegalFormatException;
+    /**
+     * Formats the object using the specified formatter.
+     * 
+     * @param formatter
+     *            The formatter to use in the formatTo.
+     * @param flags
+     *            The flags applied to the output format, which is a bitmask
+     *            that is any combination of FormattableFlags.LEFT_JUSTIFY,
+     *            FormattableFlags.UPPERCASE, and FormattableFlags.ALTERNATE. If
+     *            no such flag is set, the output is formatted by the default
+     *            formatting of the implementation of the interface.
+     * @param width
+     *            The minimum number of characters that should be written to the
+     *            output. Additional space ' ' is added to the output if the
+     *            length of the converted value is less than the width until the
+     *            length equals the width. These spaces are added at the
+     *            beginning by default unless the flag
+     *            FormattableFlags.LEFT_JUSTIFY is set, which denotes that
+     *            padding should be added at the end. If width is -1, then no
+     *            minimum requirement.
+     * @param precision
+     *            The maximum number of characters that can be written to the
+     *            output. The procedure to trunk the output according to the
+     *            precision is invoked before that of padding to width. If the
+     *            precision is -1, then no maximum requirement.
+     * @throws IllegalFormatException
+     *             If any of the parameters is not supported.
+     */
+    void formatTo(Formatter formatter, int flags, int width, int precision)
+            throws IllegalFormatException;
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormatterClosedException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormatterClosedException.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormatterClosedException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormatterClosedException.java Tue Nov 27 04:57:31 2007
@@ -20,16 +20,15 @@
 
 /**
  * The unchecked exception will be thrown out if the formatter has been closed.
- * 
  */
 public class FormatterClosedException extends IllegalStateException implements
-		Serializable {
-	private static final long serialVersionUID = 18111216L;
+        Serializable {
 
-	/**
-	 * Constructs an instance of FormatterClosedException.
-	 * 
-	 */
-	public FormatterClosedException() {
-	}
+    private static final long serialVersionUID = 18111216L;
+
+    /**
+     * Constructs an instance of FormatterClosedException.
+     */
+    public FormatterClosedException() {
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashSet.java?rev=598623&r1=598622&r2=598623&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashSet.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashSet.java Tue Nov 27 04:57:31 2007
@@ -17,7 +17,6 @@
 
 package java.util;
 
-
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
@@ -28,191 +27,192 @@
  * adding and removing. The elements can be any objects.
  */
 public class HashSet<E> extends AbstractSet<E> implements Set<E>, Cloneable,
-		Serializable {
+        Serializable {
 
-	private static final long serialVersionUID = -5024744406713321676L;
+    private static final long serialVersionUID = -5024744406713321676L;
 
-	transient HashMap<E, HashSet<E>> backingMap;
+    transient HashMap<E, HashSet<E>> backingMap;
 
-	/**
-	 * Constructs a new empty instance of HashSet.
-	 */
-	public HashSet() {
-		this(new HashMap<E, HashSet<E>>());
-	}
-
-	/**
-	 * Constructs a new instance of HashSet with the specified capacity.
-	 * 
-	 * @param capacity
-	 *            the initial capacity of this HashSet
-	 */
-	public HashSet(int capacity) {
-		this(new HashMap<E, HashSet<E>>(capacity));
-	}
-
-	/**
-	 * Constructs a new instance of HashSet with the specified capacity and load
-	 * factor.
-	 * 
-	 * @param capacity
-	 *            the initial capacity
-	 * @param loadFactor
-	 *            the initial load factor
-	 */
-	public HashSet(int capacity, float loadFactor) {
-		this(new HashMap<E, HashSet<E>>(capacity, loadFactor));
-	}
-
-	/**
-	 * Constructs a new instance of HashSet containing the unique elements in
-	 * the specified collection.
-	 * 
-	 * @param collection
-	 *            the collection of elements to add
-	 */
-	public HashSet(Collection<? extends E> collection) {
-		this(new HashMap<E, HashSet<E>>(collection.size() < 6 ? 11 : collection.size() * 2));
+    /**
+     * Constructs a new empty instance of HashSet.
+     */
+    public HashSet() {
+        this(new HashMap<E, HashSet<E>>());
+    }
+
+    /**
+     * Constructs a new instance of HashSet with the specified capacity.
+     * 
+     * @param capacity
+     *            the initial capacity of this HashSet
+     */
+    public HashSet(int capacity) {
+        this(new HashMap<E, HashSet<E>>(capacity));
+    }
+
+    /**
+     * Constructs a new instance of HashSet with the specified capacity and load
+     * factor.
+     * 
+     * @param capacity
+     *            the initial capacity
+     * @param loadFactor
+     *            the initial load factor
+     */
+    public HashSet(int capacity, float loadFactor) {
+        this(new HashMap<E, HashSet<E>>(capacity, loadFactor));
+    }
+
+    /**
+     * Constructs a new instance of HashSet containing the unique elements in
+     * the specified collection.
+     * 
+     * @param collection
+     *            the collection of elements to add
+     */
+    public HashSet(Collection<? extends E> collection) {
+        this(new HashMap<E, HashSet<E>>(collection.size() < 6 ? 11 : collection
+                .size() * 2));
         for (E e : collection) {
             add(e);
         }
-	}
+    }
 
-	HashSet(HashMap<E, HashSet<E>> backingMap) {
-		this.backingMap = backingMap;
-	}
-
-	/**
-	 * Adds the specified object to this HashSet.
-	 * 
-	 * @param object
-	 *            the object to add
-	 * @return true when this HashSet did not already contain the object, false
-	 *         otherwise
-	 */
-	@Override
+    HashSet(HashMap<E, HashSet<E>> backingMap) {
+        this.backingMap = backingMap;
+    }
+
+    /**
+     * Adds the specified object to this HashSet.
+     * 
+     * @param object
+     *            the object to add
+     * @return true when this HashSet did not already contain the object, false
+     *         otherwise
+     */
+    @Override
     public boolean add(E object) {
-		return backingMap.put(object, this) == null;
-	}
+        return backingMap.put(object, this) == null;
+    }
 
-	/**
-	 * Removes all elements from this HashSet, leaving it empty.
-	 * 
-	 * @see #isEmpty
-	 * @see #size
-	 */
-	@Override
+    /**
+     * Removes all elements from this HashSet, leaving it empty.
+     * 
+     * @see #isEmpty
+     * @see #size
+     */
+    @Override
     public void clear() {
-		backingMap.clear();
-	}
+        backingMap.clear();
+    }
 
-	/**
-	 * Answers a new HashSet with the same elements and size as this HashSet.
-	 * 
-	 * @return a shallow copy of this HashSet
-	 * 
-	 * @see java.lang.Cloneable
-	 */
-	@Override
+    /**
+     * Answers a new HashSet with the same elements and size as this HashSet.
+     * 
+     * @return a shallow copy of this HashSet
+     * 
+     * @see java.lang.Cloneable
+     */
+    @Override
     @SuppressWarnings("unchecked")
     public Object clone() {
-		try {
-			HashSet<E> clone = (HashSet<E>) super.clone();
-			clone.backingMap = (HashMap<E, HashSet<E>>) backingMap.clone();
-			return clone;
-		} catch (CloneNotSupportedException e) {
-			return null;
-		}
-	}
-
-	/**
-	 * Searches this HashSet for the specified object.
-	 * 
-	 * @param object
-	 *            the object to search for
-	 * @return true if <code>object</code> is an element of this HashSet,
-	 *         false otherwise
-	 */
-	@Override
+        try {
+            HashSet<E> clone = (HashSet<E>) super.clone();
+            clone.backingMap = (HashMap<E, HashSet<E>>) backingMap.clone();
+            return clone;
+        } catch (CloneNotSupportedException e) {
+            return null;
+        }
+    }
+
+    /**
+     * Searches this HashSet for the specified object.
+     * 
+     * @param object
+     *            the object to search for
+     * @return true if <code>object</code> is an element of this HashSet,
+     *         false otherwise
+     */
+    @Override
     public boolean contains(Object object) {
-		return backingMap.containsKey(object);
-	}
+        return backingMap.containsKey(object);
+    }
 
-	/**
-	 * Answers if this HashSet has no elements, a size of zero.
-	 * 
-	 * @return true if this HashSet has no elements, false otherwise
-	 * 
-	 * @see #size
-	 */
-	@Override
+    /**
+     * Answers if this HashSet has no elements, a size of zero.
+     * 
+     * @return true if this HashSet has no elements, false otherwise
+     * 
+     * @see #size
+     */
+    @Override
     public boolean isEmpty() {
-		return backingMap.isEmpty();
-	}
+        return backingMap.isEmpty();
+    }
 
-	/**
-	 * Answers an Iterator on the elements of this HashSet.
-	 * 
-	 * @return an Iterator on the elements of this HashSet
-	 * 
-	 * @see Iterator
-	 */
-	@Override
+    /**
+     * Answers an Iterator on the elements of this HashSet.
+     * 
+     * @return an Iterator on the elements of this HashSet
+     * 
+     * @see Iterator
+     */
+    @Override
     public Iterator<E> iterator() {
-		return backingMap.keySet().iterator();
-	}
+        return backingMap.keySet().iterator();
+    }
 
-	/**
-	 * Removes an occurrence of the specified object from this HashSet.
-	 * 
-	 * @param object
-	 *            the object to remove
-	 * @return true if this HashSet is modified, false otherwise
-	 */
-	@Override
+    /**
+     * Removes an occurrence of the specified object from this HashSet.
+     * 
+     * @param object
+     *            the object to remove
+     * @return true if this HashSet is modified, false otherwise
+     */
+    @Override
     public boolean remove(Object object) {
-		return backingMap.remove(object) != null;
-	}
+        return backingMap.remove(object) != null;
+    }
 
-	/**
-	 * Answers the number of elements in this HashSet.
-	 * 
-	 * @return the number of elements in this HashSet
-	 */
-	@Override
+    /**
+     * Answers the number of elements in this HashSet.
+     * 
+     * @return the number of elements in this HashSet
+     */
+    @Override
     public int size() {
-		return backingMap.size();
-	}
+        return backingMap.size();
+    }
 
-	private void writeObject(ObjectOutputStream stream) throws IOException {
-		stream.defaultWriteObject();
-		stream.writeInt(backingMap.elementData.length);
-		stream.writeFloat(backingMap.loadFactor);
-		stream.writeInt(backingMap.elementCount);
-		for (int i = backingMap.elementData.length; --i >= 0;) {
-			HashMap.Entry<E, HashSet<E>> entry = backingMap.elementData[i];
-			while (entry != null) {
-				stream.writeObject(entry.key);
-				entry = entry.next;
-			}
-		}
-	}
+    private void writeObject(ObjectOutputStream stream) throws IOException {
+        stream.defaultWriteObject();
+        stream.writeInt(backingMap.elementData.length);
+        stream.writeFloat(backingMap.loadFactor);
+        stream.writeInt(backingMap.elementCount);
+        for (int i = backingMap.elementData.length; --i >= 0;) {
+            HashMap.Entry<E, HashSet<E>> entry = backingMap.elementData[i];
+            while (entry != null) {
+                stream.writeObject(entry.key);
+                entry = entry.next;
+            }
+        }
+    }
 
-	@SuppressWarnings("unchecked")
+    @SuppressWarnings("unchecked")
     private void readObject(ObjectInputStream stream) throws IOException,
-			ClassNotFoundException {
-		stream.defaultReadObject();
-		int length = stream.readInt();
-		float loadFactor = stream.readFloat();
-		backingMap = createBackingMap(length, loadFactor);
-		int elementCount = stream.readInt();
-		for (int i = elementCount; --i >= 0;) {
-			E key = (E)stream.readObject();
-			backingMap.put(key, this);
-		}
-	}
-
-	HashMap<E, HashSet<E>> createBackingMap(int capacity, float loadFactor) {
-		return new HashMap<E, HashSet<E>>(capacity, loadFactor);
-	}
+            ClassNotFoundException {
+        stream.defaultReadObject();
+        int length = stream.readInt();
+        float loadFactor = stream.readFloat();
+        backingMap = createBackingMap(length, loadFactor);
+        int elementCount = stream.readInt();
+        for (int i = elementCount; --i >= 0;) {
+            E key = (E) stream.readObject();
+            backingMap.put(key, this);
+        }
+    }
+
+    HashMap<E, HashSet<E>> createBackingMap(int capacity, float loadFactor) {
+        return new HashMap<E, HashSet<E>>(capacity, loadFactor);
+    }
 }



Mime
View raw message