sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1391413 - in /sis/trunk: sis-utility/src/main/java/org/apache/sis/util/Locales.java sis-utility/src/main/java/org/apache/sis/util/collection/Collections.java src/site/resources/book/book.css
Date Fri, 28 Sep 2012 11:55:42 GMT
Author: desruisseaux
Date: Fri Sep 28 11:55:41 2012
New Revision: 1391413

URL: http://svn.apache.org/viewvc?rev=1391413&view=rev
Log:
Documentation updates.

Modified:
    sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Locales.java
    sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/Collections.java
    sis/trunk/src/site/resources/book/book.css

Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Locales.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Locales.java?rev=1391413&r1=1391412&r2=1391413&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Locales.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Locales.java Fri Sep 28 11:55:41
2012
@@ -34,7 +34,7 @@ import static org.apache.sis.util.collec
 
 
 /**
- * Utilities methods working on {@link Locale} instances. While this class is documented
as
+ * Static methods working on {@link Locale} instances. While this class is documented as
  * providing static methods, a few methods are actually non-static. Those methods need to
be
  * invoked on the {@link #SYSTEM} or {@link #LIBRARY} instance in order to specify the scope.
  * Examples:
@@ -161,7 +161,7 @@ public final class Locales extends Stati
 
     /**
      * Returns the list of {@linkplain #getAvailableLocales() available locales} formatted
-     * as string in the specified locale.
+     * as strings in the specified locale.
      *
      * @param  locale The locale to use for formatting the strings to be returned.
      * @return String descriptions of available locales.
@@ -178,7 +178,8 @@ public final class Locales extends Stati
 
     /**
      * Returns the languages of the given locales, without duplicated values.
-     * The instances returned by this method have no country and no variant information.
+     * The instances returned by this method have no {@linkplain Locale#getCountry() country}
+     * and no {@linkplain Locale#getVariant() variant} information.
      *
      * @param  locales The locales from which to get the languages.
      * @return The languages, without country or variant information.
@@ -197,10 +198,13 @@ public final class Locales extends Stati
     }
 
     /**
-     * Returns the 3-letters ISO language code if available, or the 2-letters code otherwise.
+     * Returns the {@linkplain Locale#getISO3Language() 3-letters ISO language code} if available,
+     * or the {@linkplain Locale#getLanguage() 2-letters code} otherwise.
      *
      * @param  locale The locale for which we want the language.
      * @return The language code, 3 letters if possible or 2 letters otherwise.
+     *
+     * @see Locale#getISO3Language()
      */
     public static String getLanguageCode(final Locale locale) {
         try {

Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/Collections.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/Collections.java?rev=1391413&r1=1391412&r2=1391413&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/Collections.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/Collections.java Fri
Sep 28 11:55:41 2012
@@ -39,13 +39,13 @@ import static java.util.Collections.unmo
  *   <li>Null-safe {@link #clear(Collection) clear}, {@link #isNullOrEmpty(Collection)
isNullOrEmpty}
  *       and {@link #addIfNonNull(Collection, Object) addIfNonNull} methods, for the convenience
of
  *       classes using the <cite>lazy instantiation</cite> pattern.</li>
- *   <li>{@link #unmodifiableOrCopy(Set) unmodifiableOrCopy} methods, which may be
slightly more
- *       compact than the standard {@link java.util.Collections#unmodifiableSet(Set)} equivalent
- *       when the unmodifiable collection is not required to be a view over the original
collection.</li>
  *   <li>{@link #asCollection(Object) asCollection} for wrapping arbitrary objects
to list or collection.</li>
  *   <li>List and collection {@linkplain #listComparator() comparators}.</li>
- *   <li>{@link #modifiableCopy(Collection) copy} method for taking a snapshot of an
arbitrary
+ *   <li>{@link #modifiableCopy(Collection) modifiableCopy} method for taking a snapshot
of an arbitrary
  *       implementation into an unsynchronized, modifiable, in-memory object.</li>
+ *   <li>{@link #unmodifiableOrCopy(Set) unmodifiableOrCopy} methods, which may be
slightly more
+ *       compact than the standard {@link java.util.Collections#unmodifiableSet(Set)} equivalent
+ *       when the unmodifiable collection is not required to be a view over the original
collection.</li>
  * </ul>
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
@@ -188,14 +188,13 @@ public final class Collections extends S
      * Returns a unmodifiable version of the given set.
      * This method is different than the standard {@link java.util.Collections#unmodifiableSet(Set)}
      * in that it tries to returns a more efficient object when there is zero or one element.
+     * Such small set occurs frequently in Apache SIS, especially for
+     * {@link org.apache.sis.referencing.AbstractIdentifiedObject} names or identifiers.
+     * <p>
      * <em>The set returned by this method may or may not be a view of the given set</em>.
      * Consequently this method shall be used <strong>only</strong> if the given
set will
      * <strong>not</strong> be modified after this method call. In case of doubt,
use the
      * standard {@link java.util.Collections#unmodifiableSet(Set)} method instead.
-     * <p>
-     * This method is provided because sets of zero or one element are very frequent in Apache
-     * SIS, especially for {@link org.apache.sis.referencing.AbstractIdentifiedObject} names
-     * or identifiers.
      *
      * @param  <E>  The type of elements in the set.
      * @param  set  The set to make unmodifiable, or {@code null}.
@@ -225,13 +224,12 @@ public final class Collections extends S
      * Returns a unmodifiable version of the given map.
      * This method is different than the standard {@link java.util.Collections#unmodifiableMap(Map)}
      * in that it tries to returns a more efficient object when there is zero or one entry.
+     * Such small maps occur frequently in Apache SIS.
+     * <p>
      * <em>The map returned by this method may or may not be a view of the given map</em>.
      * Consequently this method shall be used <strong>only</strong> if the given
map will
      * <strong>not</strong> be modified after this method call. In case of doubt,
use the
      * standard {@link java.util.Collections#unmodifiableMap(Map)} method instead.
-     * <p>
-     * This method is provided because maps of zero or one element are very frequent
-     * in Apache SIS.
      *
      * @param  <K>  The type of keys in the map.
      * @param  <V>  The type of values in the map.
@@ -269,7 +267,7 @@ public final class Collections extends S
      * <tr><th>Input type</th><th>Output type</th></tr>
      * <tr><td>{@link SortedSet}</td><td>{@link TreeSet}</td></tr>
      * <tr><td>{@link HashSet}</td><td>{@link HashSet}</td></tr>
-     * <tr><td>Other {@link Set}</td><td>{@link LinkedHashSet}</td></tr>
+     * <tr><td>{@link Set} other than above</td><td>{@link LinkedHashSet}</td></tr>
      * <tr><td>{@link Queue}</td><td>{@link LinkedList}</td></tr>
      * <tr><td>{@link List} or other {@link Collection}</td><td>{@link
ArrayList}</td></tr>
      * </table>
@@ -321,7 +319,7 @@ public final class Collections extends S
      * <tr><th>Input type</th><th>Output type</th></tr>
      * <tr><td>{@link SortedMap}</td><td>{@link TreeMap}</td></tr>
      * <tr><td>{@link HashMap}</td><td>{@link HashMap}</td></tr>
-     * <tr><td>Other {@link Map}</td><td>{@link LinkedHashMap}</td></tr>
+     * <tr><td>{@link Map} other than above</td><td>{@link LinkedHashMap}</td></tr>
      * </table>
      *
      * @param  <K> The type of keys in the map.

Modified: sis/trunk/src/site/resources/book/book.css
URL: http://svn.apache.org/viewvc/sis/trunk/src/site/resources/book/book.css?rev=1391413&r1=1391412&r2=1391413&view=diff
==============================================================================
--- sis/trunk/src/site/resources/book/book.css (original)
+++ sis/trunk/src/site/resources/book/book.css Fri Sep 28 11:55:41 2012
@@ -83,7 +83,7 @@ code.GeoAPI {
   color: Green;
 }
 
-code.Geotk {
+code.SIS {
   color: SaddleBrown;
 }
 



Mime
View raw message