harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r601315 [4/11] - in /harmony/enhanced/classlib/branches/java6: depends/build/ modules/accessibility/src/main/java/javax/accessibility/ modules/accessibility/src/test/api/java/common/javax/accessibility/ modules/awt/src/main/java/common/java...
Date Wed, 05 Dec 2007 12:26:14 GMT
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/AbstractCollection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/AbstractCollection.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/AbstractCollection.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/AbstractCollection.java Wed Dec  5 04:25:42 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/branches/java6/modules/luni/src/main/java/java/util/AbstractSequentialList.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/AbstractSequentialList.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/AbstractSequentialList.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/AbstractSequentialList.java Wed Dec  5 04:25:42 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/branches/java6/modules/luni/src/main/java/java/util/ArrayList.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ArrayList.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ArrayList.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ArrayList.java Wed Dec  5 04:25:42 2007
@@ -103,7 +103,7 @@
      */
     @Override
     public void add(int location, E object) {
-        int size = size();
+        int size = lastIndex - firstIndex;
         if (0 < location && location < size) {
             if (firstIndex == 0 && lastIndex == array.length) {
                 growForInsert(location, 1);
@@ -168,7 +168,7 @@
      */
     @Override
     public boolean addAll(int location, Collection<? extends E> collection) {
-        int size = size();
+        int size = lastIndex - firstIndex;
         if (location < 0 || location > size) {
             throw new IndexOutOfBoundsException();
         }
@@ -330,7 +330,7 @@
      */
     @Override
     public E get(int location) {
-        if (0 <= location && location < size()) {
+        if (0 <= location && location < (lastIndex - firstIndex)) {
             return array[firstIndex + location];
         }
         throw new IndexOutOfBoundsException();
@@ -500,7 +500,7 @@
     @Override
     public E remove(int location) {
         E result;
-        int size = size();
+        int size = lastIndex - firstIndex;
         if (0 <= location && location < size) {
             if (location == size - 1) {
                 result = array[--lastIndex];
@@ -562,11 +562,11 @@
      */
     @Override
     protected void removeRange(int start, int end) {
-        if (start >= 0 && start <= end && end <= size()) {
+        if (start >= 0 && start <= end && end <= (lastIndex - firstIndex)) {
             if (start == end) {
                 return;
             }
-            int size = size();
+            int size = lastIndex - firstIndex;
             if (end == size) {
                 Arrays.fill(array, firstIndex + start, lastIndex, null);
                 lastIndex = firstIndex + start;
@@ -601,7 +601,7 @@
      */
     @Override
     public E set(int location, E object) {
-        if (0 <= location && location < size()) {
+        if (0 <= location && location < (lastIndex - firstIndex)) {
             E result = array[firstIndex + location];
             array[firstIndex + location] = object;
             return result;
@@ -626,7 +626,7 @@
      */
     @Override
     public Object[] toArray() {
-        int size = size();
+        int size = lastIndex - firstIndex;
         Object[] result = new Object[size];
         System.arraycopy(array, firstIndex, result, 0, size);
         return result;
@@ -650,7 +650,7 @@
     @Override
     @SuppressWarnings("unchecked")
     public <T> T[] toArray(T[] contents) {
-        int size = size();
+        int size = lastIndex - firstIndex;
         if (size > contents.length) {
             Class<?> ct = contents.getClass().getComponentType();
             contents = (T[]) Array.newInstance(ct, size);
@@ -668,7 +668,7 @@
      * @see #size
      */
     public void trimToSize() {
-        int size = size();
+        int size = lastIndex - firstIndex;
         E[] newArray = newElementArray(size);
         System.arraycopy(array, firstIndex, newArray, 0, size);
         array = newArray;
@@ -682,7 +682,7 @@
 
     private void writeObject(ObjectOutputStream stream) throws IOException {
         ObjectOutputStream.PutField fields = stream.putFields();
-        fields.put("size", size()); //$NON-NLS-1$
+        fields.put("size", lastIndex - firstIndex); //$NON-NLS-1$
         stream.writeFields();
         stream.writeInt(array.length);
         Iterator<?> it = iterator();

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Calendar.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Calendar.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Calendar.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Calendar.java Wed Dec  5 04:25:42 2007
@@ -17,7 +17,6 @@
 
 package java.util;
 
-
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
@@ -178,8 +177,8 @@
 
 	/**
 	 * Answers if the Date specified by this Calendar instance is after the Date
-	 * specified by the parameter. The comparison is not dependent on the
-	 * time zones of the Calendars.
+     * specified by the parameter. The comparison is not dependent on the time
+     * zones of the Calendars.
 	 * 
 	 * @param calendar
 	 *            the Calendar instance to compare
@@ -752,11 +751,13 @@
 	 *            the time as the number of milliseconds since Jan. 1, 1970
 	 */
 	public void setTimeInMillis(long milliseconds) {
+        if (!isTimeSet || !areFieldsSet || time != milliseconds) {
 		time = milliseconds;
 		isTimeSet = true;
 		areFieldsSet = false;
 		complete();
 	}
+    }
 
 	/**
 	 * Sets the timezone used by this Calendar.
@@ -766,6 +767,7 @@
 	 */
 	public void setTimeZone(TimeZone timezone) {
 		zone = timezone;
+        areFieldsSet = false;
 	}
 
 	/**
@@ -774,13 +776,15 @@
 	 * @return the string representation of this Calendar
 	 */
 	@Override
+    @SuppressWarnings("nls")
     public String toString() {
-		StringBuffer result = new StringBuffer(getClass().getName() + "[time=" //$NON-NLS-1$
-				+ (isTimeSet ? String.valueOf(time) : "?") + ",areFieldsSet="  //$NON-NLS-1$//$NON-NLS-2$
-				+ areFieldsSet +
-				// ",areAllFieldsSet=" + areAllFieldsSet +
-				",lenient=" + lenient + ",zone=" + zone + ",firstDayOfWeek=" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-				+ firstDayOfWeek + ",minimalDaysInFirstWeek=" //$NON-NLS-1$
+        StringBuffer result = new StringBuffer(getClass().getName() + "[time="
+                + (isTimeSet ? String.valueOf(time) : "?")
+                + ",areFieldsSet="
+                + areFieldsSet
+                + // ",areAllFieldsSet=" + areAllFieldsSet +
+                ",lenient=" + lenient + ",zone=" + zone + ",firstDayOfWeek="
+                + firstDayOfWeek + ",minimalDaysInFirstWeek="
 				+ minimalDaysInFirstWeek);
 		for (int i = 0; i < FIELD_COUNT; i++) {
 			result.append(',');
@@ -970,46 +974,48 @@
 	}
 
 	private static final ObjectStreamField[] serialPersistentFields = {
-			new ObjectStreamField("areFieldsSet", Boolean.TYPE), //$NON-NLS-1$
-			new ObjectStreamField("fields", int[].class), //$NON-NLS-1$
-			new ObjectStreamField("firstDayOfWeek", Integer.TYPE), //$NON-NLS-1$
-			new ObjectStreamField("isSet", boolean[].class), //$NON-NLS-1$
-			new ObjectStreamField("isTimeSet", Boolean.TYPE), //$NON-NLS-1$
-			new ObjectStreamField("lenient", Boolean.TYPE), //$NON-NLS-1$
-			new ObjectStreamField("minimalDaysInFirstWeek", Integer.TYPE), //$NON-NLS-1$
-			new ObjectStreamField("nextStamp", Integer.TYPE), //$NON-NLS-1$
-			new ObjectStreamField("serialVersionOnStream", Integer.TYPE), //$NON-NLS-1$
-			new ObjectStreamField("time", Long.TYPE), //$NON-NLS-1$
-			new ObjectStreamField("zone", TimeZone.class), }; //$NON-NLS-1$
+            new ObjectStreamField("areFieldsSet", Boolean.TYPE),
+            new ObjectStreamField("fields", int[].class),
+            new ObjectStreamField("firstDayOfWeek", Integer.TYPE),
+            new ObjectStreamField("isSet", boolean[].class),
+            new ObjectStreamField("isTimeSet", Boolean.TYPE),
+            new ObjectStreamField("lenient", Boolean.TYPE),
+            new ObjectStreamField("minimalDaysInFirstWeek", Integer.TYPE),
+            new ObjectStreamField("nextStamp", Integer.TYPE),
+            new ObjectStreamField("serialVersionOnStream", Integer.TYPE),
+            new ObjectStreamField("time", Long.TYPE),
+            new ObjectStreamField("zone", TimeZone.class), };
 
+    @SuppressWarnings("nls")
 	private void writeObject(ObjectOutputStream stream) throws IOException {
 		complete();
 		ObjectOutputStream.PutField putFields = stream.putFields();
-		putFields.put("areFieldsSet", areFieldsSet); //$NON-NLS-1$
-		putFields.put("fields", this.fields); //$NON-NLS-1$
-		putFields.put("firstDayOfWeek", firstDayOfWeek); //$NON-NLS-1$
-		putFields.put("isSet", isSet); //$NON-NLS-1$
-		putFields.put("isTimeSet", isTimeSet); //$NON-NLS-1$
-		putFields.put("lenient", lenient); //$NON-NLS-1$
-		putFields.put("minimalDaysInFirstWeek", minimalDaysInFirstWeek); //$NON-NLS-1$
-		putFields.put("nextStamp", 2 /* MINIMUM_USER_STAMP */); //$NON-NLS-1$
-		putFields.put("serialVersionOnStream", 1); //$NON-NLS-1$
-		putFields.put("time", time); //$NON-NLS-1$
-		putFields.put("zone", zone); //$NON-NLS-1$
+        putFields.put("areFieldsSet", areFieldsSet);
+        putFields.put("fields", this.fields);
+        putFields.put("firstDayOfWeek", firstDayOfWeek);
+        putFields.put("isSet", isSet);
+        putFields.put("isTimeSet", isTimeSet);
+        putFields.put("lenient", lenient);
+        putFields.put("minimalDaysInFirstWeek", minimalDaysInFirstWeek);
+        putFields.put("nextStamp", 2 /* MINIMUM_USER_STAMP */);
+        putFields.put("serialVersionOnStream", 1);
+        putFields.put("time", time);
+        putFields.put("zone", zone);
 		stream.writeFields();
 	}
 
+    @SuppressWarnings("nls")
 	private void readObject(ObjectInputStream stream) throws IOException,
 			ClassNotFoundException {
 		ObjectInputStream.GetField readFields = stream.readFields();
-		areFieldsSet = readFields.get("areFieldsSet", false); //$NON-NLS-1$
-		this.fields = (int[]) readFields.get("fields", null); //$NON-NLS-1$
-		firstDayOfWeek = readFields.get("firstDayOfWeek", Calendar.SUNDAY); //$NON-NLS-1$
-		isSet = (boolean[]) readFields.get("isSet", null); //$NON-NLS-1$
-		isTimeSet = readFields.get("isTimeSet", false); //$NON-NLS-1$
-		lenient = readFields.get("lenient", true); //$NON-NLS-1$
-		minimalDaysInFirstWeek = readFields.get("minimalDaysInFirstWeek", 1); //$NON-NLS-1$
-		time = readFields.get("time", 0L); //$NON-NLS-1$
-		zone = (TimeZone) readFields.get("zone", null); //$NON-NLS-1$
+        areFieldsSet = readFields.get("areFieldsSet", false);
+        this.fields = (int[]) readFields.get("fields", null);
+        firstDayOfWeek = readFields.get("firstDayOfWeek", Calendar.SUNDAY);
+        isSet = (boolean[]) readFields.get("isSet", null);
+        isTimeSet = readFields.get("isTimeSet", false);
+        lenient = readFields.get("lenient", true);
+        minimalDaysInFirstWeek = readFields.get("minimalDaysInFirstWeek", 1);
+        time = readFields.get("time", 0L);
+        zone = (TimeZone) readFields.get("zone", null);
 	}
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Collection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Collection.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Collection.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Collection.java Wed Dec  5 04:25:42 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/branches/java6/modules/luni/src/main/java/java/util/Comparator.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Comparator.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Comparator.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Comparator.java Wed Dec  5 04:25:42 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/branches/java6/modules/luni/src/main/java/java/util/ConcurrentModificationException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ConcurrentModificationException.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ConcurrentModificationException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ConcurrentModificationException.java Wed Dec  5 04:25:42 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/branches/java6/modules/luni/src/main/java/java/util/Date.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Date.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Date.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Date.java Wed Dec  5 04:25:42 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();
@@ -721,9 +721,9 @@
      * @return long
      * 
      * @deprecated use: <code>
-     *	Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
-     *	cal.set(year + 1900, month, day, hour, minute, second);
-     * 	cal.getTime().getTime();</code>
+     * Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
+     * cal.set(year + 1900, month, day, hour, minute, second);
+     * cal.getTime().getTime();</code>
      */
     @Deprecated
     public static long UTC(int year, int month, int day, int hour, int minute,

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Dictionary.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Dictionary.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Dictionary.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Dictionary.java Wed Dec  5 04:25:42 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/branches/java6/modules/luni/src/main/java/java/util/DuplicateFormatFlagsException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/DuplicateFormatFlagsException.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/DuplicateFormatFlagsException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/DuplicateFormatFlagsException.java Wed Dec  5 04:25:42 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/branches/java6/modules/luni/src/main/java/java/util/EmptyStackException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/EmptyStackException.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/EmptyStackException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/EmptyStackException.java Wed Dec  5 04:25:42 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/branches/java6/modules/luni/src/main/java/java/util/Enumeration.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Enumeration.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Enumeration.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Enumeration.java Wed Dec  5 04:25:42 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/branches/java6/modules/luni/src/main/java/java/util/EventListener.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/EventListener.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/EventListener.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/EventListener.java Wed Dec  5 04:25:42 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/branches/java6/modules/luni/src/main/java/java/util/EventListenerProxy.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/EventListenerProxy.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/EventListenerProxy.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/EventListenerProxy.java Wed Dec  5 04:25:42 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/branches/java6/modules/luni/src/main/java/java/util/EventObject.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/EventObject.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/EventObject.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/EventObject.java Wed Dec  5 04:25:42 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/branches/java6/modules/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java Wed Dec  5 04:25:42 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/branches/java6/modules/luni/src/main/java/java/util/Formattable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Formattable.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Formattable.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Formattable.java Wed Dec  5 04:25:42 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/branches/java6/modules/luni/src/main/java/java/util/FormatterClosedException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormatterClosedException.java?rev=601315&r1=601314&r2=601315&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormatterClosedException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormatterClosedException.java Wed Dec  5 04:25:42 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() {
+    }
 }



Mime
View raw message