sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1497252 - in /sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso: AbstractName.java DefaultMemberName.java DefaultScopedName.java
Date Thu, 27 Jun 2013 08:57:21 GMT
Author: desruisseaux
Date: Thu Jun 27 08:57:20 2013
New Revision: 1497252

URL: http://svn.apache.org/r1497252
Log:
Added missing @return javadoc tags.

Modified:
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java?rev=1497252&r1=1497251&r2=1497252&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java
[UTF-8] Thu Jun 27 08:57:20 2013
@@ -98,6 +98,8 @@ public abstract class AbstractName imple
      * no scope. If this method is invoked on such name, then the SIS implementation returns
a
      * global scope instance (i.e. an instance for which {@link DefaultNameSpace#isGlobal()}
      * returns {@code true}) which is unique and named {@code "global"}.</p>
+     *
+     * @return The scope of this name.
      */
     @Override
     public abstract NameSpace scope();
@@ -105,6 +107,8 @@ public abstract class AbstractName imple
     /**
      * Indicates the number of levels specified by this name. The default implementation
returns
      * the size of the list returned by the {@link #getParsedNames()} method.
+     *
+     * @return The depth of this name.
      */
     @Override
     public int depth() {
@@ -124,6 +128,9 @@ public abstract class AbstractName imple
      * Returns the sequence of {@linkplain DefaultLocalName local names} making this generic
name.
      * The length of this sequence is the {@linkplain #depth() depth}. It does not include
the
      * {@linkplain #scope() scope}.
+     *
+     * @return The local names making this generic name, without the {@linkplain #scope()
scope}.
+     *         Shall never be {@code null} neither empty.
      */
     @Override
     public abstract List<? extends LocalName> getParsedNames();
@@ -132,9 +139,10 @@ public abstract class AbstractName imple
      * Returns the first element in the sequence of {@linkplain #getParsedNames() parsed
names}.
      * For any {@code LocalName}, this is always {@code this}.
      *
-     * <p><b>Example</b>:
-     * If {@code this} name is {@code "org.opengis.util.Record"} (no matter its
-     * {@linkplain #scope() scope}), then this method returns {@code "org"}.</p>
+     * {@example If <code>this</code> name is <code>"org.opengis.util.Record"</code>
+     *           (no matter its scope, then this method returns <code>"org"</code>.}
+     *
+     * @return The first element in the list of {@linkplain #getParsedNames() parsed names}.
      */
     @Override
     public LocalName head() {
@@ -145,9 +153,10 @@ public abstract class AbstractName imple
      * Returns the last element in the sequence of {@linkplain #getParsedNames() parsed names}.
      * For any {@code LocalName}, this is always {@code this}.
      *
-     * <p><b>Example</b>:
-     * If {@code this} name is {@code "org.opengis.util.Record"} (no matter its
-     * {@linkplain #scope() scope}), then this method returns {@code "Record"}.</p>
+     * {@example If <code>this</code> name is <code>"org.opengis.util.Record"</code>
+     *           (no matter its scope, then this method returns <code>"Record"</code>.}
+     *
+     * @return The last element in the list of {@linkplain #getParsedNames() parsed names}.
      */
     @Override
     public LocalName tip() {
@@ -159,6 +168,8 @@ public abstract class AbstractName imple
      * Returns a view of this name as a fully-qualified name. The {@linkplain #scope() scope}
      * of a fully qualified name is {@linkplain DefaultNameSpace#isGlobal() global}.
      * If the scope of this name is already global, then this method returns {@code this}.
+     *
+     * @return The fully-qualified name (never {@code null}).
      */
     @Override
     public synchronized GenericName toFullyQualifiedName() {
@@ -181,6 +192,9 @@ public abstract class AbstractName imple
      * {@code this} name is {@code "util.Record"} and the given {@code scope} argument is
      * {@code "org.opengis"}, then {@code this.push(scope)} shall return
      * {@code "org.opengis.util.Record"}.
+     *
+     * @param  scope The name to use as prefix.
+     * @return A concatenation of the given scope with this name.
      */
     @Override
     public ScopedName push(final GenericName scope) {
@@ -219,6 +233,8 @@ public abstract class AbstractName imple
      *   <li><code>{@linkplain #tip()}.toString()</code> is guaranteed
to not contain
      *       any scope.</li>
      * </ul>
+     *
+     * @return A local-independent string representation of this name.
      */
     @Override
     public synchronized String toString() {
@@ -246,6 +262,8 @@ public abstract class AbstractName imple
      * has been localized in the {@linkplain InternationalString#toString(Locale) specified
locale}.
      * If no international string is available, then this method returns an implementation
mapping
      * to {@link #toString()} for all locales.
+     *
+     * @return A localizable string representation of this name.
      */
     @Override
     public synchronized InternationalString toInternationalString() {
@@ -282,7 +300,7 @@ public abstract class AbstractName imple
          * @param asString The string representation of the enclosing abstract name.
          * @param parsedNames The value returned by {@link AbstractName#getParsedNames()}.
          */
-        public International(final String asString, final List<? extends LocalName>
parsedNames) {
+        International(final String asString, final List<? extends LocalName> parsedNames)
{
             super(asString);
             this.parsedNames = parsedNames;
         }
@@ -318,6 +336,14 @@ public abstract class AbstractName imple
             }
             return false;
         }
+
+        /**
+         * Returns a hash code value for this international text.
+         */
+        @Override
+        public int hashCode() {
+            return parsedNames.hashCode() ^ (int) serialVersionUID;
+        }
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java?rev=1497252&r1=1497251&r2=1497252&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java
[UTF-8] Thu Jun 27 08:57:20 2013
@@ -76,6 +76,8 @@ public class DefaultMemberName extends D
 
     /**
      * Returns the type of the data associated with the record member.
+     *
+     * @return The type of the data associated with the record member.
      */
     @Override
     public TypeName getAttributeType() {

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java?rev=1497252&r1=1497251&r2=1497252&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java
[UTF-8] Thu Jun 27 08:57:20 2013
@@ -247,8 +247,10 @@ public class DefaultScopedName extends A
     }
 
     /**
-     * Returns every elements of the {@linkplain #getParsedNames() parsed names list}
+     * Returns every elements in the sequence of {@linkplain #getParsedNames() parsed names}
      * except for the {@linkplain #head() head}.
+     *
+     * @return All elements except the first one in the in the list of {@linkplain #getParsedNames()
parsed names}.
      */
     @Override
     public synchronized GenericName tail() {
@@ -265,8 +267,10 @@ public class DefaultScopedName extends A
     }
 
     /**
-     * Returns every element of the {@linkplain #getParsedNames() parsed names list}
+     * Returns every element in the sequence of {@linkplain #getParsedNames() parsed names}
      * except for the {@linkplain #tip() tip}.
+     *
+     * @return All elements except the last one in the in the list of {@linkplain #getParsedNames()
parsed names}.
      */
     @Override
     public synchronized GenericName path() {



Mime
View raw message