sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1392720 - in /sis/trunk/sis-utility/src/main/java/org/apache/sis/util: Characters.java Utilities.java resources/package-info.java
Date Tue, 02 Oct 2012 03:21:29 GMT
Author: desruisseaux
Date: Tue Oct  2 03:21:28 2012
New Revision: 1392720

URL: http://svn.apache.org/viewvc?rev=1392720&view=rev
Log:
Documentation fixes and clarification.

Modified:
    sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Characters.java
    sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Utilities.java
    sis/trunk/sis-utility/src/main/java/org/apache/sis/util/resources/package-info.java

Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Characters.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Characters.java?rev=1392720&r1=1392719&r2=1392720&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Characters.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Characters.java Tue Oct  2 03:21:28
2012
@@ -27,10 +27,10 @@ package org.apache.sis.util;
  */
 public final class Characters extends Static {
     /**
-     * The <cite>no-break space</cite> (Unicode {@code \\u00A0}, HTML {@code
&nbsp;}).
+     * The <cite>no-break space</cite> (Unicode {@code \u00A0}, HTML {@code &nbsp;}).
      * Apache SIS uses Unicode symbols directly in the source code for easier reading,
      * except for no-break spaces since they can not be visually distinguished from the
-     * ordinary space (Unicode {@code \\u0020}).
+     * ordinary space (Unicode {@code \u0020}).
      */
     public static final char NO_BREAK_SPACE = '\u00A0';
 

Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Utilities.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Utilities.java?rev=1392720&r1=1392719&r2=1392720&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Utilities.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Utilities.java Tue Oct  2 03:21:28
2012
@@ -71,15 +71,16 @@ public final class Utilities extends Sta
      * <ul>
      *   <li>If the supplied object is {@code null}, then this method returns 0.</li>
      *   <li>Otherwise if the object is an array of objects, then
-     *       {@link Arrays#deepHashCode(Object[])} is invoked.</li>
+     *       {@link java.util.Arrays#deepHashCode(Object[])} is invoked.</li>
      *   <li>Otherwise if the object is an array of primitive type, then the corresponding
-     *       {@link Arrays#hashCode(double[]) Arrays.hashCode(...)} method is invoked.</li>
-     *   <li>Otherwise {@link Object#hashCode()} is invoked.<li>
+     *       {@link java.util.Arrays#hashCode(double[]) Arrays.hashCode(...)} method is invoked.</li>
+     *   <li>Otherwise {@link Object#hashCode()} is invoked.</li>
      * </ul>
      * <p>
      * This method should be invoked <strong>only</strong> if the object type
is declared
      * exactly as {@code Object}, not as some subtype like {@code Object[]}, {@code String}
or
-     * {@code float[]}. In the later cases, use the appropriate {@link Arrays} method instead.
+     * {@code float[]}. In the later cases, use the appropriate {@link java.util.Arrays}
method
+     * instead.
      *
      * @param object The object to compute hash code. May be {@code null}.
      * @return The hash code of the given object.
@@ -106,15 +107,16 @@ public final class Utilities extends Sta
      * <p>
      * <ul>
      *   <li>If the object is an array of objects, then
-     *       {@link Arrays#deepToString(Object[])} is invoked.</li>
+     *       {@link java.util.Arrays#deepToString(Object[])} is invoked.</li>
      *   <li>Otherwise if the object is an array of primitive type, then the corresponding
-     *       {@link Arrays#toString(double[]) Arrays.toString(...)} method is invoked.</li>
+     *       {@link java.util.Arrays#toString(double[]) Arrays.toString(...)} method is invoked.</li>
      *   <li>Otherwise {@link String#valueOf(Object)} is invoked.</li>
      * </ul>
      * <p>
      * This method should be invoked <strong>only</strong> if the object type
is declared
      * exactly as {@code Object}, not as some subtype like {@code Object[]}, {@code Number}
or
-     * {@code float[]}. In the later cases, use the appropriate {@link Arrays} method instead.
+     * {@code float[]}. In the later cases, use the appropriate {@link java.util.Arrays}
method
+     * instead.
      *
      * @param object The object to format as a string. May be {@code null}.
      * @return A string representation of the given object.

Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/util/resources/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/util/resources/package-info.java?rev=1392720&r1=1392719&r2=1392720&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/util/resources/package-info.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/util/resources/package-info.java Tue
Oct  2 03:21:28 2012
@@ -28,9 +28,17 @@
  *
  * <ul>
  *   <li>the key name ends with the {@code '_'} character followed by the expected
number of parameters;</li>
- *   <li>the value string will be compliant with the {@link java.text.MessageFormat}
syntax.</li>
+ *   <li>the value string is compliant with the {@link java.text.MessageFormat} syntax.</li>
  * </ul>
  *
+ * {@note <code>java.util.Formatter</code> is an alternative to <code>MessageFormat</code>
providing
+ * similar functionalities with a C/C++ like syntax. However <code>MessageFormat</code>
has two
+ * advantages: it provides a <code>choice</code> format type (useful for handling
plural forms),
+ * and localizes properly objects of unspecified type (by contrast, the <code>Formatter</code>
+ * <code>"%s"</code> type always invoke <code>toString()</code>).
The later advantage is
+ * important for messages in wich the same argument could receive <code>Number</code>
or
+ * <code>Date</code> instances as well as <code>String</code>.}
+ *
  * <p>Apache SIS developers can add resources by editing the {@code *.properties} file
  * in the source code directory, then run the localized resources compiler provided in the
  * <code><a href="{@website}/sis-build-helper/index.html">sis-build-helper</a></code>
module.



Mime
View raw message