harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r598631 [2/2] - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/
Date Tue, 27 Nov 2007 13:14:21 GMT
Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ListIterator.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ListIterator.java?rev=598631&r1=598630&r2=598631&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ListIterator.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ListIterator.java Tue Nov 27 05:14:12 2007
@@ -17,128 +17,127 @@
 
 package java.util;
 
-
 /**
  * An ListIterator is used to sequence over a List of objects. ListIterator can
  * move backwards or forwards through the List.
  */
 public interface ListIterator<E> extends Iterator<E> {
-	
-	/**
-	 * Inserts the specified object into the list between <code>next</code>
-	 * and <code>previous</code>. The object inserted will be the previous
-	 * object.
-	 * 
-	 * @param object
-	 *            the object to insert
-	 * 
-	 * @exception UnsupportedOperationException
-	 *                when adding is not supported by the list being iterated
-	 * @exception ClassCastException
-	 *                when the class of the object is inappropriate for the list
-	 * @exception IllegalArgumentException
-	 *                when the object cannot be added to the list
-	 */
-	void add(E object);
-
-	/**
-	 * Answers if there are more elements to iterate.
-	 * 
-	 * @return true if there are more elements, false otherwise
-	 * 
-	 * @see #next
-	 */
-	public boolean hasNext();
-
-	/**
-	 * Answers if there are previous elements to iterate.
-	 * 
-	 * @return true if there are previous elements, false otherwise
-	 * 
-	 * @see #previous
-	 */
-	public boolean hasPrevious();
-
-	/**
-	 * Answers the next object in the iteration.
-	 * 
-	 * @return the next object
-	 * 
-	 * @exception NoSuchElementException
-	 *                when there are no more elements
-	 * 
-	 * @see #hasNext
-	 */
-	public E next();
-
-	/**
-	 * Answers the index of the next object in the iteration.
-	 * 
-	 * @return the index of the next object
-	 * 
-	 * @exception NoSuchElementException
-	 *                when there are no more elements
-	 * 
-	 * @see #next
-	 */
-	public int nextIndex();
-
-	/**
-	 * Answers the previous object in the iteration.
-	 * 
-	 * @return the previous object
-	 * 
-	 * @exception NoSuchElementException
-	 *                when there are no previous elements
-	 * 
-	 * @see #hasPrevious
-	 */
-	public E previous();
-
-	/**
-	 * Answers the index of the previous object in the iteration.
-	 * 
-	 * @return the index of the previous object
-	 * 
-	 * @exception NoSuchElementException
-	 *                when there are no previous elements
-	 * 
-	 * @see #previous
-	 */
-	public int previousIndex();
-
-	/**
-	 * Removes the last object returned by <code>next</code> or
-	 * <code>previous</code> from the list.
-	 * 
-	 * @exception UnsupportedOperationException
-	 *                when removing is not supported by the list being iterated
-	 * @exception IllegalStateException
-	 *                when <code>next</code> or <code>previous</code> have
-	 *                not been called, or <code>remove</code> or
-	 *                <code>add</code> have already been called after the last
-	 *                call to <code>next</code> or <code>previous</code>
-	 */
-	public void remove();
-
-	/**
-	 * Replaces the last object returned by <code>next</code> or
-	 * <code>previous</code> with the specified object.
-	 * 
-	 * @param object
-	 *            the object to add
-	 * 
-	 * @exception UnsupportedOperationException
-	 *                when adding is not supported by the list being iterated
-	 * @exception ClassCastException
-	 *                when the class of the object is inappropriate for the list
-	 * @exception IllegalArgumentException
-	 *                when the object cannot be added to the list
-	 * @exception IllegalStateException
-	 *                when <code>next</code> or <code>previous</code> have
-	 *                not been called, or <code>remove</code> or
-	 *                <code>add</code> have already been called after the last
-	 *                call to <code>next</code> or <code>previous</code>
-	 */
-	void set(E object);
+
+    /**
+     * Inserts the specified object into the list between <code>next</code>
+     * and <code>previous</code>. The object inserted will be the previous
+     * object.
+     * 
+     * @param object
+     *            the object to insert
+     * 
+     * @exception UnsupportedOperationException
+     *                when adding is not supported by the list being iterated
+     * @exception ClassCastException
+     *                when the class of the object is inappropriate for the list
+     * @exception IllegalArgumentException
+     *                when the object cannot be added to the list
+     */
+    void add(E object);
+
+    /**
+     * Answers if there are more elements to iterate.
+     * 
+     * @return true if there are more elements, false otherwise
+     * 
+     * @see #next
+     */
+    public boolean hasNext();
+
+    /**
+     * Answers if there are previous elements to iterate.
+     * 
+     * @return true if there are previous elements, false otherwise
+     * 
+     * @see #previous
+     */
+    public boolean hasPrevious();
+
+    /**
+     * Answers the next object in the iteration.
+     * 
+     * @return the next object
+     * 
+     * @exception NoSuchElementException
+     *                when there are no more elements
+     * 
+     * @see #hasNext
+     */
+    public E next();
+
+    /**
+     * Answers the index of the next object in the iteration.
+     * 
+     * @return the index of the next object
+     * 
+     * @exception NoSuchElementException
+     *                when there are no more elements
+     * 
+     * @see #next
+     */
+    public int nextIndex();
+
+    /**
+     * Answers the previous object in the iteration.
+     * 
+     * @return the previous object
+     * 
+     * @exception NoSuchElementException
+     *                when there are no previous elements
+     * 
+     * @see #hasPrevious
+     */
+    public E previous();
+
+    /**
+     * Answers the index of the previous object in the iteration.
+     * 
+     * @return the index of the previous object
+     * 
+     * @exception NoSuchElementException
+     *                when there are no previous elements
+     * 
+     * @see #previous
+     */
+    public int previousIndex();
+
+    /**
+     * Removes the last object returned by <code>next</code> or
+     * <code>previous</code> from the list.
+     * 
+     * @exception UnsupportedOperationException
+     *                when removing is not supported by the list being iterated
+     * @exception IllegalStateException
+     *                when <code>next</code> or <code>previous</code> have
+     *                not been called, or <code>remove</code> or
+     *                <code>add</code> have already been called after the last
+     *                call to <code>next</code> or <code>previous</code>
+     */
+    public void remove();
+
+    /**
+     * Replaces the last object returned by <code>next</code> or
+     * <code>previous</code> with the specified object.
+     * 
+     * @param object
+     *            the object to add
+     * 
+     * @exception UnsupportedOperationException
+     *                when adding is not supported by the list being iterated
+     * @exception ClassCastException
+     *                when the class of the object is inappropriate for the list
+     * @exception IllegalArgumentException
+     *                when the object cannot be added to the list
+     * @exception IllegalStateException
+     *                when <code>next</code> or <code>previous</code> have
+     *                not been called, or <code>remove</code> or
+     *                <code>add</code> have already been called after the last
+     *                call to <code>next</code> or <code>previous</code>
+     */
+    void set(E object);
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java?rev=598631&r1=598630&r2=598631&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java Tue Nov 27 05:14:12 2007
@@ -43,176 +43,178 @@
  * @see ResourceBundle
  */
 public final class Locale implements Cloneable, Serializable {
-	
-	private static final long serialVersionUID = 9149081749638150636L;
 
-	private static volatile Locale[] availableLocales;
+    private static final long serialVersionUID = 9149081749638150636L;
+
+    private static volatile Locale[] availableLocales;
+
+    // Initialize a default which is used during static
+    // initialization of the default for the platform.
+    private static Locale defaultLocale = new Locale();
+
+    /**
+     * Locale constant for en_CA.
+     */
+    public static final Locale CANADA = new Locale("en", "CA"); //$NON-NLS-1$ //$NON-NLS-2$
+
+    /**
+     * Locale constant for fr_CA.
+     */
+    public static final Locale CANADA_FRENCH = new Locale("fr", "CA"); //$NON-NLS-1$ //$NON-NLS-2$
+
+    /**
+     * Locale constant for zh_CN.
+     */
+    public static final Locale CHINA = new Locale("zh", "CN"); //$NON-NLS-1$ //$NON-NLS-2$
+
+    /**
+     * Locale constant for zh.
+     */
+    public static final Locale CHINESE = new Locale("zh", ""); //$NON-NLS-1$//$NON-NLS-2$
+
+    /**
+     * Locale constant for en.
+     */
+    public static final Locale ENGLISH = new Locale("en", ""); //$NON-NLS-1$ //$NON-NLS-2$
+
+    /**
+     * Locale constant for fr_FR.
+     */
+    public static final Locale FRANCE = new Locale("fr", "FR"); //$NON-NLS-1$//$NON-NLS-2$
+
+    /**
+     * Locale constant for fr.
+     */
+    public static final Locale FRENCH = new Locale("fr", ""); //$NON-NLS-1$//$NON-NLS-2$
+
+    /**
+     * Locale constant for de.
+     */
+    public static final Locale GERMAN = new Locale("de", ""); //$NON-NLS-1$ //$NON-NLS-2$
+
+    /**
+     * Locale constant for de_DE.
+     */
+    public static final Locale GERMANY = new Locale("de", "DE"); //$NON-NLS-1$ //$NON-NLS-2$
+
+    /**
+     * Locale constant for it.
+     */
+    public static final Locale ITALIAN = new Locale("it", ""); //$NON-NLS-1$ //$NON-NLS-2$
+
+    /**
+     * Locale constant for it_IT.
+     */
+    public static final Locale ITALY = new Locale("it", "IT"); //$NON-NLS-1$ //$NON-NLS-2$
+
+    /**
+     * Locale constant for ja_JP.
+     */
+    public static final Locale JAPAN = new Locale("ja", "JP"); //$NON-NLS-1$//$NON-NLS-2$
+
+    /**
+     * Locale constant for ja.
+     */
+    public static final Locale JAPANESE = new Locale("ja", ""); //$NON-NLS-1$//$NON-NLS-2$
+
+    /**
+     * Locale constant for ko_KR.
+     */
+    public static final Locale KOREA = new Locale("ko", "KR"); //$NON-NLS-1$//$NON-NLS-2$
+
+    /**
+     * Locale constant for ko.
+     */
+    public static final Locale KOREAN = new Locale("ko", ""); //$NON-NLS-1$//$NON-NLS-2$
+
+    /**
+     * Locale constant for zh_CN.
+     */
+    public static final Locale PRC = new Locale("zh", "CN"); //$NON-NLS-1$//$NON-NLS-2$
+
+    /**
+     * Locale constant for zh_CN.
+     */
+    public static final Locale SIMPLIFIED_CHINESE = new Locale("zh", "CN"); //$NON-NLS-1$//$NON-NLS-2$
+
+    /**
+     * Locale constant for zh_TW.
+     */
+    public static final Locale TAIWAN = new Locale("zh", "TW"); //$NON-NLS-1$ //$NON-NLS-2$
+
+    /**
+     * Locale constant for zh_TW.
+     */
+    public static final Locale TRADITIONAL_CHINESE = new Locale("zh", "TW"); //$NON-NLS-1$ //$NON-NLS-2$
+
+    /**
+     * Locale constant for en_GB.
+     */
+    public static final Locale UK = new Locale("en", "GB"); //$NON-NLS-1$ //$NON-NLS-2$
+
+    /**
+     * Locale constant for en_US.
+     */
+    public static final Locale US = new Locale("en", "US"); //$NON-NLS-1$//$NON-NLS-2$
+
+    private static final PropertyPermission setLocalePermission = new PropertyPermission(
+            "user.language", "write"); //$NON-NLS-1$//$NON-NLS-2$
+
+    static {
+        String language = AccessController
+                .doPrivileged(new PriviAction<String>("user.language", "en")); //$NON-NLS-1$ //$NON-NLS-2$
+        String region = AccessController.doPrivileged(new PriviAction<String>(
+                "user.country", "US")); //$NON-NLS-1$ //$NON-NLS-2$
+        String variant = AccessController.doPrivileged(new PriviAction<String>(
+                "user.variant", "")); //$NON-NLS-1$ //$NON-NLS-2$
+        defaultLocale = new Locale(language, region, variant);
+    }
 
-	// Initialize a default which is used during static
-	// initialization of the default for the platform.
-	private static Locale defaultLocale = new Locale();
-
-	/**
-	 * Locale constant for en_CA.
-	 */
-	public static final Locale CANADA = new Locale("en", "CA"); //$NON-NLS-1$ //$NON-NLS-2$
-
-	/**
-	 * Locale constant for fr_CA.
-	 */
-	public static final Locale CANADA_FRENCH = new Locale("fr", "CA"); //$NON-NLS-1$ //$NON-NLS-2$
-
-	/**
-	 * Locale constant for zh_CN.
-	 */
-	public static final Locale CHINA = new Locale("zh", "CN"); //$NON-NLS-1$ //$NON-NLS-2$
-
-	/**
-	 * Locale constant for zh.
-	 */
-	public static final Locale CHINESE = new Locale("zh", "");  //$NON-NLS-1$//$NON-NLS-2$
-
-	/**
-	 * Locale constant for en.
-	 */
-	public static final Locale ENGLISH = new Locale("en", ""); //$NON-NLS-1$ //$NON-NLS-2$
-
-	/**
-	 * Locale constant for fr_FR.
-	 */
-	public static final Locale FRANCE = new Locale("fr", "FR");  //$NON-NLS-1$//$NON-NLS-2$
-
-	/**
-	 * Locale constant for fr.
-	 */
-	public static final Locale FRENCH = new Locale("fr", "");  //$NON-NLS-1$//$NON-NLS-2$
-
-	/**
-	 * Locale constant for de.
-	 */
-	public static final Locale GERMAN = new Locale("de", ""); //$NON-NLS-1$ //$NON-NLS-2$
-
-	/**
-	 * Locale constant for de_DE.
-	 */
-	public static final Locale GERMANY = new Locale("de", "DE"); //$NON-NLS-1$ //$NON-NLS-2$
-
-	/**
-	 * Locale constant for it.
-	 */
-	public static final Locale ITALIAN = new Locale("it", ""); //$NON-NLS-1$ //$NON-NLS-2$
-
-	/**
-	 * Locale constant for it_IT.
-	 */
-	public static final Locale ITALY = new Locale("it", "IT"); //$NON-NLS-1$ //$NON-NLS-2$
-
-	/**
-	 * Locale constant for ja_JP.
-	 */
-	public static final Locale JAPAN = new Locale("ja", "JP");  //$NON-NLS-1$//$NON-NLS-2$
-
-	/**
-	 * Locale constant for ja.
-	 */
-	public static final Locale JAPANESE = new Locale("ja", "");  //$NON-NLS-1$//$NON-NLS-2$
-
-	/**
-	 * Locale constant for ko_KR.
-	 */
-	public static final Locale KOREA = new Locale("ko", "KR");  //$NON-NLS-1$//$NON-NLS-2$
-
-	/**
-	 * Locale constant for ko.
-	 */
-	public static final Locale KOREAN = new Locale("ko", "");  //$NON-NLS-1$//$NON-NLS-2$
-
-	/**
-	 * Locale constant for zh_CN.
-	 */
-	public static final Locale PRC = new Locale("zh", "CN");  //$NON-NLS-1$//$NON-NLS-2$
-
-	/**
-	 * Locale constant for zh_CN.
-	 */
-	public static final Locale SIMPLIFIED_CHINESE = new Locale("zh", "CN");  //$NON-NLS-1$//$NON-NLS-2$
-
-	/**
-	 * Locale constant for zh_TW.
-	 */
-	public static final Locale TAIWAN = new Locale("zh", "TW"); //$NON-NLS-1$ //$NON-NLS-2$
-
-	/**
-	 * Locale constant for zh_TW.
-	 */
-	public static final Locale TRADITIONAL_CHINESE = new Locale("zh", "TW"); //$NON-NLS-1$ //$NON-NLS-2$
-
-	/**
-	 * Locale constant for en_GB.
-	 */
-	public static final Locale UK = new Locale("en", "GB"); //$NON-NLS-1$ //$NON-NLS-2$
-
-	/**
-	 * Locale constant for en_US.
-	 */
-	public static final Locale US = new Locale("en", "US");  //$NON-NLS-1$//$NON-NLS-2$
-
-	private static final PropertyPermission setLocalePermission = new PropertyPermission(
-			"user.language", "write");  //$NON-NLS-1$//$NON-NLS-2$
-
-	static {
-		String language = AccessController
-				.doPrivileged(new PriviAction<String>("user.language", "en")); //$NON-NLS-1$ //$NON-NLS-2$
-		String region = AccessController.doPrivileged(new PriviAction<String>(
-				"user.country", "US")); //$NON-NLS-1$ //$NON-NLS-2$
-		String variant = AccessController
-				.doPrivileged(new PriviAction<String>("user.variant", "")); //$NON-NLS-1$ //$NON-NLS-2$
-		defaultLocale = new Locale(language, region, variant);
-	}
-    
     private transient String countryCode;
     private transient String languageCode;
     private transient String variantCode;
 
-	/**
-	 * Constructs a default which is used during static initialization of the
-	 * default for the platform.
-	 */
-	private Locale() {
-		languageCode = "en"; //$NON-NLS-1$
-		countryCode = "US"; //$NON-NLS-1$
-		variantCode = ""; //$NON-NLS-1$
-	}
-
-	/**
-	 * Constructs a new Locale using the specified language.
-	 * @param language 
-	 * 
-	 */
-	public Locale(String language) {
-		this(language, "", "");  //$NON-NLS-1$//$NON-NLS-2$
-	}
-
-	/**
-	 * Constructs a new Locale using the specified language and country codes.
-	 * @param language 
-	 * @param country 
-	 * 
-	 */
-	public Locale(String language, String country) {
-		this(language, country, ""); //$NON-NLS-1$
-	}
+    /**
+     * Constructs a default which is used during static initialization of the
+     * default for the platform.
+     */
+    private Locale() {
+        languageCode = "en"; //$NON-NLS-1$
+        countryCode = "US"; //$NON-NLS-1$
+        variantCode = ""; //$NON-NLS-1$
+    }
+
+    /**
+     * Constructs a new Locale using the specified language.
+     * 
+     * @param language
+     * 
+     */
+    public Locale(String language) {
+        this(language, "", ""); //$NON-NLS-1$//$NON-NLS-2$
+    }
 
-	/**
+    /**
+     * Constructs a new Locale using the specified language and country codes.
+     * 
+     * @param language
+     * @param country
+     * 
+     */
+    public Locale(String language, String country) {
+        this(language, country, ""); //$NON-NLS-1$
+    }
+
+    /**
      * Constructs a new Locale using the specified language, country, and
      * variant codes.
      * 
      * @param language
      * @param country
      * @param variant
-     * @throws NullPointerException if <code>language</code>,
-     *         <code>country</code> or <code>variant</code> is
-     *         <code>null</code>.
+     * @throws NullPointerException
+     *             if <code>language</code>, <code>country</code> or
+     *             <code>variant</code> is <code>null</code>.
      */
     public Locale(String language, String country, String variant) {
         if (language == null || country == null || variant == null) {
@@ -235,66 +237,66 @@
         variantCode = variant;
     }
 
-	/**
-	 * Answers a new Locale with the same language, country and variant codes as
-	 * this Locale.
-	 * 
-	 * @return a shallow copy of this Locale
-	 * 
-	 * @see java.lang.Cloneable
-	 */
-	@Override
+    /**
+     * Answers a new Locale with the same language, country and variant codes as
+     * this Locale.
+     * 
+     * @return a shallow copy of this Locale
+     * 
+     * @see java.lang.Cloneable
+     */
+    @Override
     public Object clone() {
-		try {
-			return super.clone();
-		} catch (CloneNotSupportedException e) {
-			return null;
-		}
-	}
-
-	/**
-	 * Compares the specified object to this Locale and answer if they are
-	 * equal. The object must be an instance of Locale and have the same
-	 * language, country and variant.
-	 * 
-	 * @param object
-	 *            the object to compare with this object
-	 * @return true if the specified object is equal to this Locale, false
-	 *         otherwise
-	 * 
-	 * @see #hashCode
-	 */
-	@Override
+        try {
+            return super.clone();
+        } catch (CloneNotSupportedException e) {
+            return null;
+        }
+    }
+
+    /**
+     * Compares the specified object to this Locale and answer if they are
+     * equal. The object must be an instance of Locale and have the same
+     * language, country and variant.
+     * 
+     * @param object
+     *            the object to compare with this object
+     * @return true if the specified object is equal to this Locale, false
+     *         otherwise
+     * 
+     * @see #hashCode
+     */
+    @Override
     public boolean equals(Object object) {
-		if (object == this) {
+        if (object == this) {
             return true;
         }
-		if (object instanceof Locale) {
-			Locale o = (Locale) object;
-			return languageCode.equals(o.languageCode)
-					&& countryCode.equals(o.countryCode)
-					&& variantCode.equals(o.variantCode);
-		}
-		return false;
-	}
-
-	static Locale[] find(String prefix) {
-		int last = prefix.lastIndexOf('/');
-		final String thePackage = prefix.substring(0, last + 1);
-		int length = prefix.length();
+        if (object instanceof Locale) {
+            Locale o = (Locale) object;
+            return languageCode.equals(o.languageCode)
+                    && countryCode.equals(o.countryCode)
+                    && variantCode.equals(o.variantCode);
+        }
+        return false;
+    }
+
+    static Locale[] find(String prefix) {
+        int last = prefix.lastIndexOf('/');
+        final String thePackage = prefix.substring(0, last + 1);
+        int length = prefix.length();
         final String classPrefix = prefix.substring(last + 1, length);
-		Set<String> result = new HashSet<String>();
-		StringTokenizer paths = new StringTokenizer(System.getProperty(
-				"org.apache.harmony.boot.class.path", ""), System.getProperty( //$NON-NLS-1$ //$NON-NLS-2$
-				"path.separator", ";"));  //$NON-NLS-1$//$NON-NLS-2$
-		while (paths.hasMoreTokens()) {
-			String nextToken = paths.nextToken();
-			File directory = new File(nextToken);
-			if (directory.exists()) {
-				if (directory.isDirectory()) {
+        Set<String> result = new HashSet<String>();
+        StringTokenizer paths = new StringTokenizer(System.getProperty(
+                "org.apache.harmony.boot.class.path", ""), System.getProperty( //$NON-NLS-1$ //$NON-NLS-2$
+                "path.separator", ";")); //$NON-NLS-1$//$NON-NLS-2$
+        while (paths.hasMoreTokens()) {
+            String nextToken = paths.nextToken();
+            File directory = new File(nextToken);
+            if (directory.exists()) {
+                if (directory.isDirectory()) {
                     String path;
                     try {
-						path = directory.getCanonicalPath();
+                        path = directory.getCanonicalPath();
                     } catch (IOException e) {
                         continue;
                     }
@@ -311,63 +313,65 @@
                             String name = list[i];
                             if (name.startsWith(classPrefix)
                                     && name.endsWith(".class")) { //$NON-NLS-1$
-                                result.add(name.substring(0,
+                                result
+                                        .add(name.substring(0,
                                                 name.length() - 6));
                             }
                         }
                     }
-					
-				} else {
-					// Handle ZIP/JAR files.
-					try {
-						ZipFile zip = new ZipFile(directory);
-						Enumeration<? extends ZipEntry> entries = zip.entries();
-						while (entries.hasMoreElements()) {
+
+                } else {
+                    // Handle ZIP/JAR files.
+                    try {
+                        ZipFile zip = new ZipFile(directory);
+                        Enumeration<? extends ZipEntry> entries = zip.entries();
+                        while (entries.hasMoreElements()) {
                             ZipEntry e = entries.nextElement();
-							String name = e.getName();
-							if (name.startsWith(prefix)
+                            String name = e.getName();
+                            if (name.startsWith(prefix)
                                     && name.endsWith(".class")) {//$NON-NLS-1$
-                                result.add(name.substring(last+1, name.length() - 6));
+                                result.add(name.substring(last + 1, name
+                                        .length() - 6));
                             }
-						}
-						zip.close();
-					} catch (IOException e) {
-                       // Empty
-					}
-				}
-			}
-		}
-		Locale[] locales = new Locale[result.size()];
+                        }
+                        zip.close();
+                    } catch (IOException e) {
+                        // Empty
+                    }
+                }
+            }
+        }
+        Locale[] locales = new Locale[result.size()];
         int i = 0;
-		for (String name: result) {
-			int index = name.indexOf('_');
-			int nextIndex = name.indexOf('_', index + 1);
-			if (nextIndex == -1) {
-                locales[i++] = new Locale(name
-                        .substring(index + 1, name.length()), ""); //$NON-NLS-1$
-			}else{
-    			String language = name.substring(index + 1, nextIndex);
-    			String variant;
-    			if ((index = name.indexOf('_', nextIndex + 1)) == -1) {
-    				variant = ""; //$NON-NLS-1$
-    				index = name.length();
-    			} else {
+        for (String name : result) {
+            int index = name.indexOf('_');
+            int nextIndex = name.indexOf('_', index + 1);
+            if (nextIndex == -1) {
+                locales[i++] = new Locale(name.substring(index + 1, name
+                        .length()), ""); //$NON-NLS-1$
+            } else {
+                String language = name.substring(index + 1, nextIndex);
+                String variant;
+                if ((index = name.indexOf('_', nextIndex + 1)) == -1) {
+                    variant = ""; //$NON-NLS-1$
+                    index = name.length();
+                } else {
                     variant = name.substring(index + 1, name.length());
                 }
-    			String country = name.substring(nextIndex + 1, index);
+                String country = name.substring(nextIndex + 1, index);
                 locales[i++] = new Locale(language, country, variant);
             }
-		}
-		return locales;
-	}
-
-	/**
-	 * Gets the list of installed Locales.
-	 * 
-	 * @return an array of Locale
-	 */
-	public static Locale[] getAvailableLocales() {
-		if (availableLocales == null) {
+        }
+        return locales;
+    }
+
+    /**
+     * Gets the list of installed Locales.
+     * 
+     * @return an array of Locale
+     */
+    public static Locale[] getAvailableLocales() {
+        if (availableLocales == null) {
             availableLocales = AccessController
                     .doPrivileged(new PrivilegedAction<Locale[]>() {
                         public Locale[] run() {
@@ -375,249 +379,249 @@
                         }
                     });
         }
-		return availableLocales.clone();
-	}
+        return availableLocales.clone();
+    }
+
+    /**
+     * Gets the country code for this Locale.
+     * 
+     * @return a country code
+     */
+    public String getCountry() {
+        return countryCode;
+    }
 
-	/**
-	 * Gets the country code for this Locale.
-	 * 
-	 * @return a country code
-	 */
-	public String getCountry() {
-		return countryCode;
-	}
-
-	/**
-	 * Gets the default Locale.
-	 * 
-	 * @return the default Locale
-	 */
-	public static Locale getDefault() {
-		return defaultLocale;
-	}
-
-	/**
-	 * Gets the full country name in the default Locale for the country code of
-	 * this Locale. If there is no matching country name, the country code is
-	 * returned.
-	 * 
-	 * @return a country name
-	 */
-	public final String getDisplayCountry() {
-		return getDisplayCountry(getDefault());
-	}
-
-	/**
-	 * Gets the full country name in the specified Locale for the country code
-	 * of this Locale. If there is no matching country name, the country code is
-	 * returned.
-	 * 
-	 * @param locale
-	 *            the Locale
-	 * @return a country name
-	 */
-	public String getDisplayCountry(Locale locale) {
-		if (countryCode.length() == 0) {
+    /**
+     * Gets the default Locale.
+     * 
+     * @return the default Locale
+     */
+    public static Locale getDefault() {
+        return defaultLocale;
+    }
+
+    /**
+     * Gets the full country name in the default Locale for the country code of
+     * this Locale. If there is no matching country name, the country code is
+     * returned.
+     * 
+     * @return a country name
+     */
+    public final String getDisplayCountry() {
+        return getDisplayCountry(getDefault());
+    }
+
+    /**
+     * Gets the full country name in the specified Locale for the country code
+     * of this Locale. If there is no matching country name, the country code is
+     * returned.
+     * 
+     * @param locale
+     *            the Locale
+     * @return a country name
+     */
+    public String getDisplayCountry(Locale locale) {
+        if (countryCode.length() == 0) {
             return countryCode;
         }
-		try {
-			// First try the specified locale
-			ResourceBundle bundle = getBundle("Country", locale); //$NON-NLS-1$
-			String result = (String) bundle.handleGetObject(countryCode);
-			if (result != null) {
+        try {
+            // First try the specified locale
+            ResourceBundle bundle = getBundle("Country", locale); //$NON-NLS-1$
+            String result = (String) bundle.handleGetObject(countryCode);
+            if (result != null) {
                 return result;
             }
-			// Now use the default locale
-			if (locale != Locale.getDefault()) {
+            // Now use the default locale
+            if (locale != Locale.getDefault()) {
                 bundle = getBundle("Country", Locale.getDefault()); //$NON-NLS-1$
             }
-			return bundle.getString(countryCode);
-		} catch (MissingResourceException e) {
-			return countryCode;
-		}
-	}
-
-	/**
-	 * Gets the full language name in the default Locale for the language code
-	 * of this Locale. If there is no matching language name, the language code
-	 * is returned.
-	 * 
-	 * @return a language name
-	 */
-	public final String getDisplayLanguage() {
-		return getDisplayLanguage(getDefault());
-	}
-
-	/**
-	 * Gets the full language name in the specified Locale for the language code
-	 * of this Locale. If there is no matching language name, the language code
-	 * is returned.
-	 * 
-	 * @param locale
-	 *            the Locale
-	 * @return a language name
-	 */
-	public String getDisplayLanguage(Locale locale) {
-		if (languageCode.length() == 0) {
+            return bundle.getString(countryCode);
+        } catch (MissingResourceException e) {
+            return countryCode;
+        }
+    }
+
+    /**
+     * Gets the full language name in the default Locale for the language code
+     * of this Locale. If there is no matching language name, the language code
+     * is returned.
+     * 
+     * @return a language name
+     */
+    public final String getDisplayLanguage() {
+        return getDisplayLanguage(getDefault());
+    }
+
+    /**
+     * Gets the full language name in the specified Locale for the language code
+     * of this Locale. If there is no matching language name, the language code
+     * is returned.
+     * 
+     * @param locale
+     *            the Locale
+     * @return a language name
+     */
+    public String getDisplayLanguage(Locale locale) {
+        if (languageCode.length() == 0) {
             return languageCode;
         }
-		try {
-			// First try the specified locale
-			ResourceBundle bundle = getBundle("Language", locale); //$NON-NLS-1$
-			String result = (String) bundle.handleGetObject(languageCode);
-			if (result != null) {
+        try {
+            // First try the specified locale
+            ResourceBundle bundle = getBundle("Language", locale); //$NON-NLS-1$
+            String result = (String) bundle.handleGetObject(languageCode);
+            if (result != null) {
                 return result;
             }
-			// Now use the default locale
-			if (locale != Locale.getDefault()) {
+            // Now use the default locale
+            if (locale != Locale.getDefault()) {
                 bundle = getBundle("Language", Locale.getDefault()); //$NON-NLS-1$
             }
-			return bundle.getString(languageCode);
-		} catch (MissingResourceException e) {
-			return languageCode;
-		}
-	}
-
-	/**
-	 * Gets the full language, country, and variant names in the default Locale
-	 * for the codes of this Locale.
-	 * 
-	 * @return a Locale name
-	 */
-	public final String getDisplayName() {
-		return getDisplayName(getDefault());
-	}
-
-	/**
-	 * Gets the full language, country, and variant names in the specified
-	 * Locale for the codes of this Locale.
-	 * 
-	 * @param locale
-	 *            the Locale
-	 * @return a Locale name
-	 */
-	public String getDisplayName(Locale locale) {
-		int count = 0;
-		StringBuffer buffer = new StringBuffer();
-		if (languageCode.length() > 0) {
-			buffer.append(getDisplayLanguage(locale));
-			count++;
-		}
-		if (countryCode.length() > 0) {
-			if (count == 1) {
+            return bundle.getString(languageCode);
+        } catch (MissingResourceException e) {
+            return languageCode;
+        }
+    }
+
+    /**
+     * Gets the full language, country, and variant names in the default Locale
+     * for the codes of this Locale.
+     * 
+     * @return a Locale name
+     */
+    public final String getDisplayName() {
+        return getDisplayName(getDefault());
+    }
+
+    /**
+     * Gets the full language, country, and variant names in the specified
+     * Locale for the codes of this Locale.
+     * 
+     * @param locale
+     *            the Locale
+     * @return a Locale name
+     */
+    public String getDisplayName(Locale locale) {
+        int count = 0;
+        StringBuffer buffer = new StringBuffer();
+        if (languageCode.length() > 0) {
+            buffer.append(getDisplayLanguage(locale));
+            count++;
+        }
+        if (countryCode.length() > 0) {
+            if (count == 1) {
                 buffer.append(" ("); //$NON-NLS-1$
             }
-			buffer.append(getDisplayCountry(locale));
-			count++;
-		}
-		if (variantCode.length() > 0) {
-			if (count == 1) {
+            buffer.append(getDisplayCountry(locale));
+            count++;
+        }
+        if (variantCode.length() > 0) {
+            if (count == 1) {
                 buffer.append(" ("); //$NON-NLS-1$
             } else if (count == 2) {
                 buffer.append(","); //$NON-NLS-1$
             }
-			buffer.append(getDisplayVariant(locale));
-			count++;
-		}
-		if (count > 1) {
+            buffer.append(getDisplayVariant(locale));
+            count++;
+        }
+        if (count > 1) {
             buffer.append(")"); //$NON-NLS-1$
         }
-		return buffer.toString();
-	}
+        return buffer.toString();
+    }
 
-	/**
-	 * Gets the full variant name in the default Locale for the variant code of
-	 * this Locale. If there is no matching variant name, the variant code is
-	 * returned.
-	 * 
-	 * @return a variant name
-	 */
-	public final String getDisplayVariant() {
-		return getDisplayVariant(getDefault());
-	}
-
-	/**
-	 * Gets the full variant name in the specified Locale for the variant code
-	 * of this Locale. If there is no matching variant name, the variant code is
-	 * returned.
-	 * 
-	 * @param locale
-	 *            the Locale
-	 * @return a variant name
-	 */
-	public String getDisplayVariant(Locale locale) {
-		if (variantCode.length() == 0) {
+    /**
+     * Gets the full variant name in the default Locale for the variant code of
+     * this Locale. If there is no matching variant name, the variant code is
+     * returned.
+     * 
+     * @return a variant name
+     */
+    public final String getDisplayVariant() {
+        return getDisplayVariant(getDefault());
+    }
+
+    /**
+     * Gets the full variant name in the specified Locale for the variant code
+     * of this Locale. If there is no matching variant name, the variant code is
+     * returned.
+     * 
+     * @param locale
+     *            the Locale
+     * @return a variant name
+     */
+    public String getDisplayVariant(Locale locale) {
+        if (variantCode.length() == 0) {
             return variantCode;
         }
-		ResourceBundle bundle;
-		try {
-			bundle = getBundle("Variant", locale); //$NON-NLS-1$
-		} catch (MissingResourceException e) {
-			return variantCode.replace('_', ',');
-		}
-
-		StringBuffer result = new StringBuffer();
-		StringTokenizer tokens = new StringTokenizer(variantCode, "_"); //$NON-NLS-1$
-		while (tokens.hasMoreTokens()) {
-			String code, variant = tokens.nextToken();
-			try {
-				code = bundle.getString(variant);
-			} catch (MissingResourceException e) {
-				code = variant;
-			}
-			result.append(code);
-			if (tokens.hasMoreTokens()) {
+        ResourceBundle bundle;
+        try {
+            bundle = getBundle("Variant", locale); //$NON-NLS-1$
+        } catch (MissingResourceException e) {
+            return variantCode.replace('_', ',');
+        }
+
+        StringBuffer result = new StringBuffer();
+        StringTokenizer tokens = new StringTokenizer(variantCode, "_"); //$NON-NLS-1$
+        while (tokens.hasMoreTokens()) {
+            String code, variant = tokens.nextToken();
+            try {
+                code = bundle.getString(variant);
+            } catch (MissingResourceException e) {
+                code = variant;
+            }
+            result.append(code);
+            if (tokens.hasMoreTokens()) {
                 result.append(',');
             }
-		}
-		return result.toString();
-	}
-
-	/**
-	 * Gets the three letter ISO country code which corresponds to the country
-	 * code for this Locale.
-	 * 
-	 * @return a three letter ISO language code
-	 * 
-	 * @exception MissingResourceException
-	 *                when there is no matching three letter ISO country code
-	 */
-	public String getISO3Country() throws MissingResourceException {
-		if (countryCode.length() == 0) {
+        }
+        return result.toString();
+    }
+
+    /**
+     * Gets the three letter ISO country code which corresponds to the country
+     * code for this Locale.
+     * 
+     * @return a three letter ISO language code
+     * 
+     * @exception MissingResourceException
+     *                when there is no matching three letter ISO country code
+     */
+    public String getISO3Country() throws MissingResourceException {
+        if (countryCode.length() == 0) {
             return ""; //$NON-NLS-1$
         }
-		ResourceBundle bundle = getBundle("ISO3Countries", this); //$NON-NLS-1$
-		return bundle.getString(countryCode);
-	}
-
-	/**
-	 * Gets the three letter ISO language code which corresponds to the language
-	 * code for this Locale.
-	 * 
-	 * @return a three letter ISO language code
-	 * 
-	 * @exception MissingResourceException
-	 *                when there is no matching three letter ISO language code
-	 */
-	public String getISO3Language() throws MissingResourceException {
-		if (languageCode.length() == 0) {
+        ResourceBundle bundle = getBundle("ISO3Countries", this); //$NON-NLS-1$
+        return bundle.getString(countryCode);
+    }
+
+    /**
+     * Gets the three letter ISO language code which corresponds to the language
+     * code for this Locale.
+     * 
+     * @return a three letter ISO language code
+     * 
+     * @exception MissingResourceException
+     *                when there is no matching three letter ISO language code
+     */
+    public String getISO3Language() throws MissingResourceException {
+        if (languageCode.length() == 0) {
             return ""; //$NON-NLS-1$
         }
-		ResourceBundle bundle = getBundle("ISO3Languages", this); //$NON-NLS-1$
-		return bundle.getString(languageCode);
-	}
-
-	/**
-	 * Gets the list of two letter ISO country codes which can be used as the
-	 * country code for a Locale.
-	 * 
-	 * @return an array of String
-	 */
-	public static String[] getISOCountries() {
+        ResourceBundle bundle = getBundle("ISO3Languages", this); //$NON-NLS-1$
+        return bundle.getString(languageCode);
+    }
+
+    /**
+     * Gets the list of two letter ISO country codes which can be used as the
+     * country code for a Locale.
+     * 
+     * @return an array of String
+     */
+    public static String[] getISOCountries() {
         ListResourceBundle bundle = new Country();
 
         // To initialize the table
-        Enumeration<String> keys = bundle.getKeys(); 
+        Enumeration<String> keys = bundle.getKeys();
         int size = bundle.table.size();
         String[] result = new String[size];
         int index = 0;
@@ -628,130 +632,133 @@
         return result;
     }
 
-	/**
-	 * Gets the list of two letter ISO language codes which can be used as the
-	 * language code for a Locale.
-	 * 
-	 * @return an array of String
-	 */
-	public static String[] getISOLanguages() {
-		ListResourceBundle bundle = new Language();
-		Enumeration<String> keys = bundle.getKeys(); // to initialize the table
-		String[] result = new String[bundle.table.size()];
-		int index = 0;
-		while (keys.hasMoreElements()) {
+    /**
+     * Gets the list of two letter ISO language codes which can be used as the
+     * language code for a Locale.
+     * 
+     * @return an array of String
+     */
+    public static String[] getISOLanguages() {
+        ListResourceBundle bundle = new Language();
+        Enumeration<String> keys = bundle.getKeys(); // to initialize the
+                                                        // table
+        String[] result = new String[bundle.table.size()];
+        int index = 0;
+        while (keys.hasMoreElements()) {
             result[index++] = keys.nextElement();
         }
-		return result;
-	}
+        return result;
+    }
+
+    /**
+     * Gets the language code for this Locale.
+     * 
+     * @return a language code
+     */
+    public String getLanguage() {
+        return languageCode;
+    }
+
+    /**
+     * Gets the variant code for this Locale.
+     * 
+     * @return a variant code
+     */
+    public String getVariant() {
+        return variantCode;
+    }
 
-	/**
-	 * Gets the language code for this Locale.
-	 * 
-	 * @return a language code
-	 */
-	public String getLanguage() {
-		return languageCode;
-	}
-
-	/**
-	 * Gets the variant code for this Locale.
-	 * 
-	 * @return a variant code
-	 */
-	public String getVariant() {
-		return variantCode;
-	}
-
-	/**
-	 * 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
-	 */
-	@Override
+    /**
+     * 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
+     */
+    @Override
     public synchronized int hashCode() {
-		return countryCode.hashCode() + languageCode.hashCode()
-				+ variantCode.hashCode();
-	}
-
-	/**
-	 * Sets the default Locale to the specified Locale.
-	 * 
-	 * @param locale
-	 *            the new default Locale
-	 * 
-	 * @exception SecurityException
-	 *                when there is a security manager which does not allow this
-	 *                operation
-	 */
-	public synchronized static void setDefault(Locale locale) {
-		if (locale != null) {
-			SecurityManager security = System.getSecurityManager();
-			if (security != null) {
+        return countryCode.hashCode() + languageCode.hashCode()
+                + variantCode.hashCode();
+    }
+
+    /**
+     * Sets the default Locale to the specified Locale.
+     * 
+     * @param locale
+     *            the new default Locale
+     * 
+     * @exception SecurityException
+     *                when there is a security manager which does not allow this
+     *                operation
+     */
+    public synchronized static void setDefault(Locale locale) {
+        if (locale != null) {
+            SecurityManager security = System.getSecurityManager();
+            if (security != null) {
                 security.checkPermission(setLocalePermission);
             }
-			defaultLocale = locale;
-		} else {
+            defaultLocale = locale;
+        } else {
             throw new NullPointerException();
         }
-	}
+    }
 
-	/**
-	 * Answers the string representation of this Locale.
-	 * 
-	 * @return the string representation of this Locale
-	 */
-	@Override
+    /**
+     * Answers the string representation of this Locale.
+     * 
+     * @return the string representation of this Locale
+     */
+    @Override
     public final String toString() {
-		StringBuilder result = new StringBuilder();
-		result.append(languageCode);
-		if (countryCode.length() > 0) {
-			result.append('_');
-			result.append(countryCode);
-		}
-		if (variantCode.length() > 0 && result.length() > 0 ) {
-			if (0 == countryCode.length()) {
+        StringBuilder result = new StringBuilder();
+        result.append(languageCode);
+        if (countryCode.length() > 0) {
+            result.append('_');
+            result.append(countryCode);
+        }
+        if (variantCode.length() > 0 && result.length() > 0) {
+            if (0 == countryCode.length()) {
                 result.append("__"); //$NON-NLS-1$
             } else {
                 result.append('_');
             }
-			result.append(variantCode);
-		}
-		return result.toString();
-	}
-
-	static ResourceBundle getBundle(final String clName, final Locale locale) {
-		return AccessController.doPrivileged(new PrivilegedAction<ResourceBundle>() {
-					public ResourceBundle run() {
-						return ResourceBundle.getBundle("org.apache.harmony.luni.internal.locale." //$NON-NLS-1$
-								+ clName, locale);
-					}
-				});
-	}
-
-	private static final ObjectStreamField[] serialPersistentFields = {
-			new ObjectStreamField("country", String.class), //$NON-NLS-1$
-			new ObjectStreamField("hashcode", Integer.TYPE), //$NON-NLS-1$
-			new ObjectStreamField("language", String.class), //$NON-NLS-1$
-			new ObjectStreamField("variant", String.class) }; //$NON-NLS-1$
-
-	private void writeObject(ObjectOutputStream stream) throws IOException {
-		ObjectOutputStream.PutField fields = stream.putFields();
-		fields.put("country", countryCode); //$NON-NLS-1$
-		fields.put("hashcode", -1); //$NON-NLS-1$
-		fields.put("language", languageCode); //$NON-NLS-1$
-		fields.put("variant", variantCode); //$NON-NLS-1$
-		stream.writeFields();
-	}
-
-	private void readObject(ObjectInputStream stream) throws IOException,
-			ClassNotFoundException {
-		ObjectInputStream.GetField fields = stream.readFields();
-		countryCode = (String) fields.get("country", "");  //$NON-NLS-1$//$NON-NLS-2$
-		languageCode = (String) fields.get("language", "");  //$NON-NLS-1$//$NON-NLS-2$
-		variantCode = (String) fields.get("variant", "");  //$NON-NLS-1$//$NON-NLS-2$
-	}
+            result.append(variantCode);
+        }
+        return result.toString();
+    }
+
+    static ResourceBundle getBundle(final String clName, final Locale locale) {
+        return AccessController
+                .doPrivileged(new PrivilegedAction<ResourceBundle>() {
+                    public ResourceBundle run() {
+                        return ResourceBundle.getBundle(
+                                "org.apache.harmony.luni.internal.locale." //$NON-NLS-1$
+                                        + clName, locale);
+                    }
+                });
+    }
+
+    private static final ObjectStreamField[] serialPersistentFields = {
+            new ObjectStreamField("country", String.class), //$NON-NLS-1$
+            new ObjectStreamField("hashcode", Integer.TYPE), //$NON-NLS-1$
+            new ObjectStreamField("language", String.class), //$NON-NLS-1$
+            new ObjectStreamField("variant", String.class) }; //$NON-NLS-1$
+
+    private void writeObject(ObjectOutputStream stream) throws IOException {
+        ObjectOutputStream.PutField fields = stream.putFields();
+        fields.put("country", countryCode); //$NON-NLS-1$
+        fields.put("hashcode", -1); //$NON-NLS-1$
+        fields.put("language", languageCode); //$NON-NLS-1$
+        fields.put("variant", variantCode); //$NON-NLS-1$
+        stream.writeFields();
+    }
+
+    private void readObject(ObjectInputStream stream) throws IOException,
+            ClassNotFoundException {
+        ObjectInputStream.GetField fields = stream.readFields();
+        countryCode = (String) fields.get("country", ""); //$NON-NLS-1$//$NON-NLS-2$
+        languageCode = (String) fields.get("language", ""); //$NON-NLS-1$//$NON-NLS-2$
+        variantCode = (String) fields.get("variant", ""); //$NON-NLS-1$//$NON-NLS-2$
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MapEntry.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MapEntry.java?rev=598631&r1=598630&r2=598631&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MapEntry.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MapEntry.java Tue Nov 27 05:14:12 2007
@@ -17,72 +17,71 @@
 
 package java.util;
 
-
 /**
  * MapEntry is an internal class which provides an implementation of Map.Entry.
  */
-class MapEntry<K,V> implements Map.Entry<K,V>, Cloneable {
-	
-	K key;
+class MapEntry<K, V> implements Map.Entry<K, V>, Cloneable {
+
+    K key;
     V value;
 
-	interface Type<RT,KT,VT> {
-		RT get(MapEntry<KT,VT> entry);
-	}
-
-	MapEntry(K theKey) {
-		key = theKey;
-	}
-
-	MapEntry(K theKey, V theValue) {
-		key = theKey;
-		value = theValue;
-	}
+    interface Type<RT, KT, VT> {
+        RT get(MapEntry<KT, VT> entry);
+    }
+
+    MapEntry(K theKey) {
+        key = theKey;
+    }
+
+    MapEntry(K theKey, V theValue) {
+        key = theKey;
+        value = theValue;
+    }
 
-	@Override
+    @Override
     public Object clone() {
-		try {
-			return super.clone();
-		} catch (CloneNotSupportedException e) {
-			return null;
-		}
-	}
+        try {
+            return super.clone();
+        } catch (CloneNotSupportedException e) {
+            return null;
+        }
+    }
 
-	@Override
+    @Override
     public boolean equals(Object object) {
-		if (this == object) {
+        if (this == object) {
             return true;
         }
-		if (object instanceof Map.Entry) {
-			Map.Entry<?, ?> entry = (Map.Entry<?, ?>) object;
-			return (key == null ? entry.getKey() == null : key.equals(entry
-					.getKey()))
-					&& (value == null ? entry.getValue() == null : value
-							.equals(entry.getValue()));
-		}
+        if (object instanceof Map.Entry) {
+            Map.Entry<?, ?> entry = (Map.Entry<?, ?>) object;
+            return (key == null ? entry.getKey() == null : key.equals(entry
+                    .getKey()))
+                    && (value == null ? entry.getValue() == null : value
+                            .equals(entry.getValue()));
+        }
         return false;
-	}
+    }
 
-	public K getKey() {
-		return key;
-	}
+    public K getKey() {
+        return key;
+    }
 
-	public V getValue() {
-		return value;
-	}
+    public V getValue() {
+        return value;
+    }
 
-	@Override
+    @Override
     public int hashCode() {
-		return (key == null ? 0 : key.hashCode())
-				^ (value == null ? 0 : value.hashCode());
-	}
-
-	public V setValue(V object) {
-		V result = value;
-		value = object;
-		return result;
-	}
-    
+        return (key == null ? 0 : key.hashCode())
+                ^ (value == null ? 0 : value.hashCode());
+    }
+
+    public V setValue(V object) {
+        V result = value;
+        value = object;
+        return result;
+    }
+
     @Override
     public String toString() {
         return key + "=" + value;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatArgumentException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatArgumentException.java?rev=598631&r1=598630&r2=598631&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatArgumentException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatArgumentException.java Tue Nov 27 05:14:12 2007
@@ -20,43 +20,44 @@
 
 /**
  * The unchecked exception will be thrown out if there no corresponding argument
- * with the specified conversion or an argument index that refers to a
- * missing argument.
+ * with the specified conversion or an argument index that refers to a missing
+ * argument.
  */
 public class MissingFormatArgumentException extends IllegalFormatException {
-	private static final long serialVersionUID = 19190115L;
 
-	private String s;
+    private static final long serialVersionUID = 19190115L;
 
-	/**
-	 * Constructs an MissingFormatArgumentException with the specified
-	 * conversion that lacks the argument.
-	 * 
-	 * @param s
-	 *            The specified conversion that lacks the argument.
-	 */
-	public MissingFormatArgumentException(String s) {
-		if (null == s) {
-			throw new NullPointerException();
-		}
-		this.s = s;
-	}
+    private String s;
 
-	/**
-	 * Returns the conversion associated with the exception.
-	 * 
-	 * @return The conversion associated with the exception.
-	 */
-	public String getFormatSpecifier() {
-		return s;
-	}
+    /**
+     * Constructs an MissingFormatArgumentException with the specified
+     * conversion that lacks the argument.
+     * 
+     * @param s
+     *            The specified conversion that lacks the argument.
+     */
+    public MissingFormatArgumentException(String s) {
+        if (null == s) {
+            throw new NullPointerException();
+        }
+        this.s = s;
+    }
 
-	/**
-	 * Returns the message of the exception.
-	 * 
-	 * @return The message of the exception.
-	 */
-	@Override
+    /**
+     * Returns the conversion associated with the exception.
+     * 
+     * @return The conversion associated with the exception.
+     */
+    public String getFormatSpecifier() {
+        return s;
+    }
+
+    /**
+     * Returns the message of the exception.
+     * 
+     * @return The message of the exception.
+     */
+    @Override
     public String getMessage() {
         return Msg.getString("K0348", s);
     }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatWidthException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatWidthException.java?rev=598631&r1=598630&r2=598631&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatWidthException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatWidthException.java Tue Nov 27 05:14:12 2007
@@ -19,45 +19,44 @@
 /**
  * The unchecked exception will be thrown out if the format width is missing but
  * is required.
- * 
- * 
  */
 public class MissingFormatWidthException extends IllegalFormatException {
-	private static final long serialVersionUID = 15560123L;
 
-	private String s;
+    private static final long serialVersionUID = 15560123L;
 
-	/**
-	 * Constructs a MissingFormatWidthException with the specified format
-	 * specifier.
-	 * 
-	 * @param s
-	 *            The specified format specifier.
-	 */
-	public MissingFormatWidthException(String s) {
-		if (null == s) {
-			throw new NullPointerException();
-		}
-		this.s = s;
-	}
+    private String s;
 
-	/**
-	 * Returns the format specifier associated with the exception.
-	 * 
-	 * @return The format specifier associated with the exception.
-	 */
-	public String getFormatSpecifier() {
-		return s;
-	}
+    /**
+     * Constructs a MissingFormatWidthException with the specified format
+     * specifier.
+     * 
+     * @param s
+     *            The specified format specifier.
+     */
+    public MissingFormatWidthException(String s) {
+        if (null == s) {
+            throw new NullPointerException();
+        }
+        this.s = s;
+    }
 
-	/**
-	 * Returns the message of the exception.
-	 * 
-	 * @return The message of the exception.
-	 */
-	@Override
+    /**
+     * Returns the format specifier associated with the exception.
+     * 
+     * @return The format specifier associated with the exception.
+     */
+    public String getFormatSpecifier() {
+        return s;
+    }
+
+    /**
+     * Returns the message of the exception.
+     * 
+     * @return The message of the exception.
+     */
+    @Override
     public String getMessage() {
-		return s;
-	}
+        return s;
+    }
 
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingResourceException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingResourceException.java?rev=598631&r1=598630&r2=598631&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingResourceException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingResourceException.java Tue Nov 27 05:14:12 2007
@@ -17,7 +17,6 @@
 
 package java.util;
 
-
 /**
  * This runtime exception is thrown by ResourceBundle when a resouce bundle
  * cannot be found or a resource is missing from a resource bundle.
@@ -26,47 +25,47 @@
  */
 public class MissingResourceException extends RuntimeException {
 
-	private static final long serialVersionUID = -4876345176062000401L;
-
-	String className, key;
-
-	/**
-	 * Constructs a new instance of this class with its walkback, message, the
-	 * class name of the resource bundle and the name of the missing resource.
-	 * 
-	 * @param detailMessage
-	 *            String The detail message for the exception.
-	 * @param className
-	 *            String The class name of the resource bundle.
-	 * @param resourceName
-	 *            String The name of the missing resource.
-	 */
-	public MissingResourceException(String detailMessage, String className,
-			String resourceName) {
-		super(detailMessage);
-		this.className = className;
-		key = resourceName;
-	}
+    private static final long serialVersionUID = -4876345176062000401L;
 
-	/**
-	 * Answers the class name of the resource bundle from which a resource could
-	 * not be found, or in the case of a missing resource, the name of the
-	 * missing resource bundle.
-	 * 
-	 * @return String The class name of the resource bundle.
-	 */
-	public String getClassName() {
-		return className;
-	}
+    String className, key;
 
-	/**
-	 * Answers the name of the missing resource, or an empty string if the
-	 * resource bundle is missing.
-	 * 
-	 * @return String The name of the missing resource.
-	 */
-	public String getKey() {
-		return key;
-	}
+    /**
+     * Constructs a new instance of this class with its walkback, message, the
+     * class name of the resource bundle and the name of the missing resource.
+     * 
+     * @param detailMessage
+     *            String The detail message for the exception.
+     * @param className
+     *            String The class name of the resource bundle.
+     * @param resourceName
+     *            String The name of the missing resource.
+     */
+    public MissingResourceException(String detailMessage, String className,
+            String resourceName) {
+        super(detailMessage);
+        this.className = className;
+        key = resourceName;
+    }
+
+    /**
+     * Answers the class name of the resource bundle from which a resource could
+     * not be found, or in the case of a missing resource, the name of the
+     * missing resource bundle.
+     * 
+     * @return String The class name of the resource bundle.
+     */
+    public String getClassName() {
+        return className;
+    }
+
+    /**
+     * Answers the name of the missing resource, or an empty string if the
+     * resource bundle is missing.
+     * 
+     * @return String The name of the missing resource.
+     */
+    public String getKey() {
+        return key;
+    }
 
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/NoSuchElementException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/NoSuchElementException.java?rev=598631&r1=598630&r2=598631&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/NoSuchElementException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/NoSuchElementException.java Tue Nov 27 05:14:12 2007
@@ -17,7 +17,6 @@
 
 package java.util;
 
-
 /**
  * This runtime exception is thrown when trying to retrieve an element past the
  * end of an Enumeration, or the first or last element from an empty Vector.
@@ -27,24 +26,24 @@
  */
 public class NoSuchElementException extends RuntimeException {
 
-	private static final long serialVersionUID = 6769829250639411880L;
+    private static final long serialVersionUID = 6769829250639411880L;
 
-	/**
-	 * Constructs a new instance of this class with its walkback filled in.
-	 */
-	public NoSuchElementException() {
-		super();
-	}
+    /**
+     * Constructs a new instance of this class with its walkback filled in.
+     */
+    public NoSuchElementException() {
+        super();
+    }
 
-	/**
-	 * Constructs a new instance of this class with its walkback and message
-	 * filled in.
-	 * 
-	 * @param detailMessage
-	 *            String The detail message for the exception.
-	 */
-	public NoSuchElementException(String detailMessage) {
-		super(detailMessage);
-	}
+    /**
+     * Constructs a new instance of this class with its walkback and message
+     * filled in.
+     * 
+     * @param detailMessage
+     *            String The detail message for the exception.
+     */
+    public NoSuchElementException(String detailMessage) {
+        super(detailMessage);
+    }
 
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Observer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Observer.java?rev=598631&r1=598630&r2=598631&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Observer.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Observer.java Tue Nov 27 05:14:12 2007
@@ -17,18 +17,20 @@
 
 package java.util;
 
-
 /**
  * Observer must be implemented by objects which are added to an Observable.
  */
 public interface Observer {
-	/*
-	 * When the specified observable object's <code>notifyObservers</code>
-	 * method is called and the observable object has changed, this method is
-	 * called.
-	 * 
-	 * @param observable the observable object @param data the data passed to
-	 * <code>notifyObservers</code>
-	 */
-	void update(Observable observable, Object data);
+
+    /**
+     * When the specified observable object's <code>notifyObservers</code>
+     * method is called and the observable object has changed, this method is
+     * called.
+     * 
+     * @param observable
+     *            the observable object
+     * @param data
+     *            the data passed to <code>notifyObservers</code>
+     */
+    void update(Observable observable, Object data);
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/PropertyResourceBundle.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/PropertyResourceBundle.java?rev=598631&r1=598630&r2=598631&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/PropertyResourceBundle.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/PropertyResourceBundle.java Tue Nov 27 05:14:12 2007
@@ -17,7 +17,6 @@
 
 package java.util;
 
-
 import java.io.IOException;
 import java.io.InputStream;
 
@@ -31,90 +30,91 @@
  * @since 1.1
  */
 public class PropertyResourceBundle extends ResourceBundle {
-	Properties resources;
 
-	/**
-	 * Constructs a new instance of PropertyResourceBundle and loads the
-	 * properties file from the specified input stream.
-	 * 
-	 * @param stream
-	 *            the input stream
-	 * @throws IOException 
-	 */
-	public PropertyResourceBundle(InputStream stream) throws IOException {
-		resources = new Properties();
-		resources.load(stream);
-	}
-    
+    Properties resources;
+
+    /**
+     * Constructs a new instance of PropertyResourceBundle and loads the
+     * properties file from the specified input stream.
+     * 
+     * @param stream
+     *            the input stream
+     * @throws IOException
+     */
+    public PropertyResourceBundle(InputStream stream) throws IOException {
+        resources = new Properties();
+        resources.load(stream);
+    }
+
     @SuppressWarnings("unchecked")
     private Enumeration<String> getLocalKeys() {
-        return (Enumeration<String>)resources.propertyNames();
+        return (Enumeration<String>) resources.propertyNames();
     }
 
-	/**
-	 * Answers the names of the resources contained in this
-	 * PropertyResourceBundle.
-	 * 
-	 * @return an Enumeration of the resource names
-	 */
-	@Override
+    /**
+     * Answers the names of the resources contained in this
+     * PropertyResourceBundle.
+     * 
+     * @return an Enumeration of the resource names
+     */
+    @Override
     public Enumeration<String> getKeys() {
-		if (parent == null) {
+        if (parent == null) {
             return getLocalKeys();
         }
-		return new Enumeration<String>() {
-			Enumeration<String> local = getLocalKeys();
+        return new Enumeration<String>() {
+            Enumeration<String> local = getLocalKeys();
 
-			Enumeration<String> pEnum = parent.getKeys();
+            Enumeration<String> pEnum = parent.getKeys();
 
-			String nextElement;
+            String nextElement;
 
-			private boolean findNext() {
-				if (nextElement != null) {
+            private boolean findNext() {
+                if (nextElement != null) {
                     return true;
                 }
-				while (pEnum.hasMoreElements()) {
-					String next = pEnum.nextElement();
-					if (!resources.containsKey(next)) {
-						nextElement = next;
-						return true;
-					}
-				}
-				return false;
-			}
+                while (pEnum.hasMoreElements()) {
+                    String next = pEnum.nextElement();
+                    if (!resources.containsKey(next)) {
+                        nextElement = next;
+                        return true;
+                    }
+                }
+                return false;
+            }
 
-			public boolean hasMoreElements() {
-				if (local.hasMoreElements()) {
+            public boolean hasMoreElements() {
+                if (local.hasMoreElements()) {
                     return true;
                 }
-				return findNext();
-			}
+                return findNext();
+            }
 
-			public String nextElement() {
-				if (local.hasMoreElements()) {
+            public String nextElement() {
+                if (local.hasMoreElements()) {
                     return local.nextElement();
                 }
-				if (findNext()) {
-					String result = nextElement;
-					nextElement = null;
-					return result;
-				}
-				// Cause an exception
-				return pEnum.nextElement();
-			}
-		};
-	}
-
-	/**
-	 * Answers the named resource from this PropertyResourceBundle, or null if
-	 * the resource is not found.
-	 * 
-	 * @param key
-	 *            the name of the resource
-	 * @return the resource object
-	 */
-	@Override
+                if (findNext()) {
+                    String result = nextElement;
+                    nextElement = null;
+                    return result;
+                }
+                // Cause an exception
+                return pEnum.nextElement();
+            }
+        };
+    }
+
+    /**
+     * Answers the named resource from this PropertyResourceBundle, or null if
+     * the resource is not found.
+     * 
+     * @param key
+     *            the name of the resource
+     * @return the resource object
+     */
+    @Override
     public Object handleGetObject(String key) {
-		return resources.get(key);
-	}
+        return resources.get(key);
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedMap.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedMap.java?rev=598631&r1=598630&r2=598631&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedMap.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedMap.java Tue Nov 27 05:14:12 2007
@@ -17,100 +17,99 @@
 
 package java.util;
 
-
 /**
  * SortedMap is a Map where the iterators sequence in order of the sorted keys.
  */
-public interface SortedMap<K,V> extends Map<K,V> {
-	
-	/**
-	 * Answers the Comparator used to compare elements in this SortedMap.
-	 * 
-	 * @return a Comparator or null if the natural order is used
-	 */
-	public Comparator<? super K> comparator();
-
-	/**
-	 * Answer the first sorted key in this SortedMap.
-	 * 
-	 * @return the first sorted key
-	 * 
-	 * @exception NoSuchElementException
-	 *                when this SortedMap is empty
-	 */
-	public K firstKey();
-
-	/**
-	 * Answers a <code>SortedMap</code> of the specified portion of this
-	 * <code>SortedMap</code> which contains keys less than the end key. Users
-	 * should be aware that the return value is actually backed by this
-	 * <code>SortedMap</code>. Hence any modifications made to one will be
-	 * immediately visible to the other.
-	 * 
-	 * @param endKey
-	 *            the end key
-	 * @return a submap where the keys are less than <code>endKey</code>
-	 * 
-	 * @exception ClassCastException
-	 *                when the class of the end key is inappropriate for this
-	 *                SubMap
-	 * @exception NullPointerException
-	 *                when the end key is null and this SortedMap does not
-	 *                support null keys
-	 */
-	public SortedMap<K,V> headMap(K endKey);
-
-	/**
-	 * Answers the last sorted key in this SortedMap.
-	 * 
-	 * @return the last sorted key
-	 * 
-	 * @exception NoSuchElementException
-	 *                when this SortedMap is empty
-	 */
-	public K lastKey();
-
-	/**
-	 * Answers a SortedMap of the specified portion of this SortedMap which
-	 * contains keys greater or equal to the start key but less than the end
-	 * key. Users should be aware that the return value is actually backed by
-	 * this <code>SortedMap</code>. Hence any modifications made to one will
-	 * be immediately visible to the other.
-	 * 
-	 * @param startKey
-	 *            the start key
-	 * @param endKey
-	 *            the end key
-	 * @return a submap where the keys are greater or equal to
-	 *         <code>startKey</code> and less than <code>endKey</code>
-	 * 
-	 * @exception ClassCastException
-	 *                when the class of the start or end key is inappropriate
-	 *                for this SubMap
-	 * @exception NullPointerException
-	 *                when the start or end key is null and this SortedMap does
-	 *                not support null keys
-	 * @exception IllegalArgumentException
-	 *                when the start key is greater than the end key
-	 */
-	public SortedMap<K,V> subMap(K startKey, K endKey);
-
-	/**
-	 * Answers a SortedMap of the specified portion of this SortedMap which
-	 * contains keys greater or equal to the start key. The returned SortedMap
-	 * is backed by this SortedMap so changes to one are reflected by the other.
-	 * 
-	 * @param startKey
-	 *            the start key
-	 * @return a submap where the keys are greater or equal to
-	 *         <code>startKey</code>
-	 * 
-	 * @exception ClassCastException
-	 *                when the class of the start key is inappropriate for this
-	 *                SubMap
-	 * @exception NullPointerException
-	 *                when the start key is null and this SortedMap does not
-	 *                support null keys
-	 */
-	public SortedMap<K,V> tailMap(K startKey);
+public interface SortedMap<K, V> extends Map<K, V> {
+
+    /**
+     * Answers the Comparator used to compare elements in this SortedMap.
+     * 
+     * @return a Comparator or null if the natural order is used
+     */
+    public Comparator<? super K> comparator();
+
+    /**
+     * Answer the first sorted key in this SortedMap.
+     * 
+     * @return the first sorted key
+     * 
+     * @exception NoSuchElementException
+     *                when this SortedMap is empty
+     */
+    public K firstKey();
+
+    /**
+     * Answers a <code>SortedMap</code> of the specified portion of this
+     * <code>SortedMap</code> which contains keys less than the end key. Users
+     * should be aware that the return value is actually backed by this
+     * <code>SortedMap</code>. Hence any modifications made to one will be
+     * immediately visible to the other.
+     * 
+     * @param endKey
+     *            the end key
+     * @return a submap where the keys are less than <code>endKey</code>
+     * 
+     * @exception ClassCastException
+     *                when the class of the end key is inappropriate for this
+     *                SubMap
+     * @exception NullPointerException
+     *                when the end key is null and this SortedMap does not
+     *                support null keys
+     */
+    public SortedMap<K, V> headMap(K endKey);
+
+    /**
+     * Answers the last sorted key in this SortedMap.
+     * 
+     * @return the last sorted key
+     * 
+     * @exception NoSuchElementException
+     *                when this SortedMap is empty
+     */
+    public K lastKey();
+
+    /**
+     * Answers a SortedMap of the specified portion of this SortedMap which
+     * contains keys greater or equal to the start key but less than the end
+     * key. Users should be aware that the return value is actually backed by
+     * this <code>SortedMap</code>. Hence any modifications made to one will
+     * be immediately visible to the other.
+     * 
+     * @param startKey
+     *            the start key
+     * @param endKey
+     *            the end key
+     * @return a submap where the keys are greater or equal to
+     *         <code>startKey</code> and less than <code>endKey</code>
+     * 
+     * @exception ClassCastException
+     *                when the class of the start or end key is inappropriate
+     *                for this SubMap
+     * @exception NullPointerException
+     *                when the start or end key is null and this SortedMap does
+     *                not support null keys
+     * @exception IllegalArgumentException
+     *                when the start key is greater than the end key
+     */
+    public SortedMap<K, V> subMap(K startKey, K endKey);
+
+    /**
+     * Answers a SortedMap of the specified portion of this SortedMap which
+     * contains keys greater or equal to the start key. The returned SortedMap
+     * is backed by this SortedMap so changes to one are reflected by the other.
+     * 
+     * @param startKey
+     *            the start key
+     * @return a submap where the keys are greater or equal to
+     *         <code>startKey</code>
+     * 
+     * @exception ClassCastException
+     *                when the class of the start key is inappropriate for this
+     *                SubMap
+     * @exception NullPointerException
+     *                when the start key is null and this SortedMap does not
+     *                support null keys
+     */
+    public SortedMap<K, V> tailMap(K startKey);
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedSet.java?rev=598631&r1=598630&r2=598631&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedSet.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedSet.java Tue Nov 27 05:14:12 2007
@@ -17,98 +17,97 @@
 
 package java.util;
 
-
 /**
  * SortedSet is a Set which iterates its elements in sorted order.
  */
 public interface SortedSet<E> extends Set<E> {
-	
-	/**
-	 * Answers the Comparator used to compare elements in this SortedSet.
-	 * 
-	 * @return a Comparator or null if the natural order is used
-	 */
-	public Comparator<? super E> comparator();
-
-	/**
-	 * Answer the first sorted element in this SortedSet.
-	 * 
-	 * @return the first sorted element
-	 * 
-	 * @exception NoSuchElementException
-	 *                when this SortedSet is empty
-	 */
-	public E first();
-
-	/**
-	 * Answers a SortedSet of the specified portion of this SortedSet which
-	 * contains elements less than the end element. The returned SortedSet is
-	 * backed by this SortedSet so changes to one are reflected by the other.
-	 * 
-	 * @param end
-	 *            the end element
-	 * @return a subset where the elements are less than <code>end</code>
-	 * 
-	 * @exception ClassCastException
-	 *                when the class of the end element is inappropriate for
-	 *                this SubSet
-	 * @exception NullPointerException
-	 *                when the end element is null and this SortedSet does not
-	 *                support null elements
-	 */
-	public SortedSet<E> headSet(E end);
-
-	/**
-	 * Answer the last sorted element in this SortedSet.
-	 * 
-	 * @return the last sorted element
-	 * 
-	 * @exception NoSuchElementException
-	 *                when this SortedSet is empty
-	 */
-	public E last();
-
-	/**
-	 * Answers a SortedSet of the specified portion of this SortedSet which
-	 * contains elements greater or equal to the start element but less than the
-	 * end element. The returned SortedSet is backed by this SortedMap so
-	 * changes to one are reflected by the other.
-	 * 
-	 * @param start
-	 *            the start element
-	 * @param end
-	 *            the end element
-	 * @return a subset where the elements are greater or equal to
-	 *         <code>start</code> and less than <code>end</code>
-	 * 
-	 * @exception ClassCastException
-	 *                when the class of the start or end element is
-	 *                inappropriate for this SubSet
-	 * @exception NullPointerException
-	 *                when the start or end element is null and this SortedSet
-	 *                does not support null elements
-	 * @exception IllegalArgumentException
-	 *                when the start element is greater than the end element
-	 */
-	public SortedSet<E> subSet(E start, E end);
-
-	/**
-	 * Answers a SortedSet of the specified portion of this SortedSet which
-	 * contains elements greater or equal to the start element. The returned
-	 * SortedSet is backed by this SortedSet so changes to one are reflected by
-	 * the other.
-	 * 
-	 * @param start
-	 *            the start element
-	 * @return a subset where the elements are greater or equal to
-	 *         <code>start</code>
-	 * 
-	 * @exception ClassCastException
-	 *                when the class of the start element is inappropriate for
-	 *                this SubSet
-	 * @exception NullPointerException
-	 *                when the start element is null and this SortedSet does not
-	 *                support null elements
-	 */
-	public SortedSet<E> tailSet(E start);
+
+    /**
+     * Answers the Comparator used to compare elements in this SortedSet.
+     * 
+     * @return a Comparator or null if the natural order is used
+     */
+    public Comparator<? super E> comparator();
+
+    /**
+     * Answer the first sorted element in this SortedSet.
+     * 
+     * @return the first sorted element
+     * 
+     * @exception NoSuchElementException
+     *                when this SortedSet is empty
+     */
+    public E first();
+
+    /**
+     * Answers a SortedSet of the specified portion of this SortedSet which
+     * contains elements less than the end element. The returned SortedSet is
+     * backed by this SortedSet so changes to one are reflected by the other.
+     * 
+     * @param end
+     *            the end element
+     * @return a subset where the elements are less than <code>end</code>
+     * 
+     * @exception ClassCastException
+     *                when the class of the end element is inappropriate for
+     *                this SubSet
+     * @exception NullPointerException
+     *                when the end element is null and this SortedSet does not
+     *                support null elements
+     */
+    public SortedSet<E> headSet(E end);
+
+    /**
+     * Answer the last sorted element in this SortedSet.
+     * 
+     * @return the last sorted element
+     * 
+     * @exception NoSuchElementException
+     *                when this SortedSet is empty
+     */
+    public E last();
+
+    /**
+     * Answers a SortedSet of the specified portion of this SortedSet which
+     * contains elements greater or equal to the start element but less than the
+     * end element. The returned SortedSet is backed by this SortedMap so
+     * changes to one are reflected by the other.
+     * 
+     * @param start
+     *            the start element
+     * @param end
+     *            the end element
+     * @return a subset where the elements are greater or equal to
+     *         <code>start</code> and less than <code>end</code>
+     * 
+     * @exception ClassCastException
+     *                when the class of the start or end element is
+     *                inappropriate for this SubSet
+     * @exception NullPointerException
+     *                when the start or end element is null and this SortedSet
+     *                does not support null elements
+     * @exception IllegalArgumentException
+     *                when the start element is greater than the end element
+     */
+    public SortedSet<E> subSet(E start, E end);
+
+    /**
+     * Answers a SortedSet of the specified portion of this SortedSet which
+     * contains elements greater or equal to the start element. The returned
+     * SortedSet is backed by this SortedSet so changes to one are reflected by
+     * the other.
+     * 
+     * @param start
+     *            the start element
+     * @return a subset where the elements are greater or equal to
+     *         <code>start</code>
+     * 
+     * @exception ClassCastException
+     *                when the class of the start element is inappropriate for
+     *                this SubSet
+     * @exception NullPointerException
+     *                when the start element is null and this SortedSet does not
+     *                support null elements
+     */
+    public SortedSet<E> tailSet(E start);
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Stack.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Stack.java?rev=598631&r1=598630&r2=598631&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Stack.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Stack.java Tue Nov 27 05:14:12 2007
@@ -17,94 +17,93 @@
 
 package java.util;
 
-
 /**
  * <code>Stack</code> is a Last-In/First-Out(LIFO) data structure which
  * represents a stack of objects. It enables users to pop and push onto the
  * stack, including null objects. There is no limit to the size of the stack
  */
 public class Stack<E> extends Vector<E> {
-	
-	private static final long serialVersionUID = 1224463164541339165L;
 
-	/**
-	 * Constructs a stack with the default size of <code>Vector</code>.
-	 */
-	public Stack() {
-		super();
-	}
-
-	/**
-	 * Determines if the stack is empty or not.
-	 * 
-	 * @return true if the stack is empty, false otherwise
-	 */
-	public boolean empty() {
-		return elementCount == 0;
-	}
-
-	/**
-	 * Returns the element at the top of the stack without removing it.
-	 * 
-	 * @return the element at the top of the Stack
-	 * @exception EmptyStackException
-	 *                when empty() is true
-	 * @see #pop
-	 */
-	@SuppressWarnings("unchecked")
+    private static final long serialVersionUID = 1224463164541339165L;
+
+    /**
+     * Constructs a stack with the default size of <code>Vector</code>.
+     */
+    public Stack() {
+        super();
+    }
+
+    /**
+     * Determines if the stack is empty or not.
+     * 
+     * @return true if the stack is empty, false otherwise
+     */
+    public boolean empty() {
+        return elementCount == 0;
+    }
+
+    /**
+     * Returns the element at the top of the stack without removing it.
+     * 
+     * @return the element at the top of the Stack
+     * @exception EmptyStackException
+     *                when empty() is true
+     * @see #pop
+     */
+    @SuppressWarnings("unchecked")
     public synchronized E peek() {
-		try {
-			return (E)elementData[elementCount - 1];
-		} catch (IndexOutOfBoundsException e) {
-			throw new EmptyStackException();
-		}
-	}
-
-	/**
-	 * Returns the element at the top of the stack and removes it.
-	 * 
-	 * @return the element at the top of the stack.
-	 * @exception EmptyStackException
-	 *                when empty() is true
-	 * @see #peek
-	 * @see #push
-	 */
-	@SuppressWarnings("unchecked")
+        try {
+            return (E) elementData[elementCount - 1];
+        } catch (IndexOutOfBoundsException e) {
+            throw new EmptyStackException();
+        }
+    }
+
+    /**
+     * Returns the element at the top of the stack and removes it.
+     * 
+     * @return the element at the top of the stack.
+     * @exception EmptyStackException
+     *                when empty() is true
+     * @see #peek
+     * @see #push
+     */
+    @SuppressWarnings("unchecked")
     public synchronized E pop() {
-		if(elementCount == 0){
+        if (elementCount == 0) {
             throw new EmptyStackException();
         }
-		final int index = --elementCount;
-		final E obj = (E)elementData[index];
-		elementData[index] = null;
+        final int index = --elementCount;
+        final E obj = (E) elementData[index];
+        elementData[index] = null;
         modCount++;
-		return obj;
-	}
+        return obj;
+    }
 
-	/**
-	 * Pushes the object from the parameter onto the top of the stack.
-	 * 
-	 * @param object
-	 *            The object to be added to the stack
-	 * 
-	 * @return the object argument
-	 * 
-	 * @see #peek
-	 * @see #pop
-	 */
-	public E push(E object) {
-		addElement(object);
-		return object;
-	}
-
-	/**
-	 * Returns the index of the first occurrence of the object.
-	 * 
-	 * @return the index of the first occurrence of the object
-	 * @param o
-	 *            the object to be searched
-	 */
-	public synchronized int search(Object object) {
+    /**
+     * Pushes the object from the parameter onto the top of the stack.
+     * 
+     * @param object
+     *            The object to be added to the stack
+     * 
+     * @return the object argument
+     * 
+     * @see #peek
+     * @see #pop
+     */
+    public E push(E object) {
+        addElement(object);
+        return object;
+    }
+
+    /**
+     * Returns the index of the first occurrence of the object.
+     * 
+     * @return the index of the first occurrence of the object
+     * @param o
+     *            the object to be searched
+     */
+    public synchronized int search(Object object) {
         final Object[] dumpArray = elementData;
         final int size = elementCount;
         if (object != null) {
@@ -121,5 +120,5 @@
             }
         }
         return -1;
-	}
+    }
 }



Mime
View raw message