You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2012/10/21 16:21:42 UTC
svn commit: r1400654 [1/4] - in /sis/trunk: ./
ide-project/NetBeans/nbproject/
sis-build-helper/src/main/java/org/apache/sis/internal/taglet/
sis-metadata/src/main/java/org/apache/sis/metadata/
sis-utility/src/main/java/org/apache/sis/internal/jaxb/ si...
Author: desruisseaux
Date: Sun Oct 21 14:21:40 2012
New Revision: 1400654
URL: http://svn.apache.org/viewvc?rev=1400654&view=rev
Log:
Merge from the JDK6 branch.
Added:
sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/JDK7.java
- copied unchanged from r1400653, sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/internal/util/JDK7.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/io/
- copied from r1400653, sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/io/
sis/trunk/sis-utility/src/test/java/org/apache/sis/io/
- copied from r1400653, sis/branches/JDK6/sis-utility/src/test/java/org/apache/sis/io/
sis/trunk/src/site/apt/code-format.apt
- copied unchanged from r1400653, sis/branches/JDK6/src/site/apt/code-format.apt
Modified:
sis/trunk/ (props changed)
sis/trunk/ide-project/NetBeans/nbproject/project.xml
sis/trunk/pom.xml
sis/trunk/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Module.java
sis/trunk/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Section.java
sis/trunk/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/DaemonThread.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/Executors.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/ReferenceQueueConsumer.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/Threads.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Arrays.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Characters.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Classes.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/ComparisonMode.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Debug.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Exceptions.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/LenientComparable.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Numbers.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/StringBuilders.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/Workaround.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/BackingStoreException.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/CacheEntries.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/CheckedArrayList.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/CheckedHashMap.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/CheckedHashSet.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/Collections.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/WeakEntry.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/WeakHashSet.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/WeakValueHashMap.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/collection/package-info.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerAdapter.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/logging/package-info.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/package-info.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/resources/package-info.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/type/AbstractInternationalString.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/type/DefaultInternationalString.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/type/Types.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/util/type/package-info.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/xml/IdentifiedObject.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/xml/IdentifierMap.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/xml/IdentifierSpace.java
sis/trunk/sis-utility/src/main/java/org/apache/sis/xml/XLink.java
sis/trunk/sis-utility/src/test/java/org/apache/sis/internal/jaxb/IdentifierMapAdapterTest.java
sis/trunk/sis-utility/src/test/java/org/apache/sis/internal/util/ReferenceQueueConsumerTest.java
sis/trunk/sis-utility/src/test/java/org/apache/sis/test/Assert.java
sis/trunk/sis-utility/src/test/java/org/apache/sis/test/TestCase.java
sis/trunk/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java
sis/trunk/sis-utility/src/test/java/org/apache/sis/test/TestUtilities.java
sis/trunk/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java
sis/trunk/sis-utility/src/test/java/org/apache/sis/test/package-info.java
sis/trunk/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharactersTest.java
sis/trunk/src/main/javadoc/stylesheet.css
sis/trunk/src/site/apt/index.apt
Propchange: sis/trunk/
------------------------------------------------------------------------------
Merged /sis/branches/JDK7:r1399603-1400647
Merged /sis/branches/JDK6:r1399610-1400653
Modified: sis/trunk/ide-project/NetBeans/nbproject/project.xml
URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/nbproject/project.xml?rev=1400654&r1=1400653&r2=1400654&view=diff
==============================================================================
--- sis/trunk/ide-project/NetBeans/nbproject/project.xml (original)
+++ sis/trunk/ide-project/NetBeans/nbproject/project.xml Sun Oct 21 14:21:40 2012
@@ -19,18 +19,24 @@
</data>
<spellchecker-wordlist xmlns="http://www.netbeans.org/ns/spellchecker-wordlist/1">
<word>bitmask</word>
+ <word>classname</word>
+ <word>classpath</word>
<word>deserialization</word>
<word>deserialized</word>
<word>initially</word>
<word>javadoc</word>
+ <word>loggings</word>
<word>marshallable</word>
<word>marshalled</word>
<word>marshalling</word>
+ <word>metadata</word>
+ <word>monospaced</word>
<word>namespace</word>
<word>namespaces</word>
<word>timezone</word>
<word>Unicode</word>
<word>unmarshalling</word>
+ <word>whitespaces</word>
</spellchecker-wordlist>
</configuration>
</project>
Modified: sis/trunk/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/pom.xml?rev=1400654&r1=1400653&r2=1400654&view=diff
==============================================================================
--- sis/trunk/pom.xml (original)
+++ sis/trunk/pom.xml Sun Oct 21 14:21:40 2012
@@ -451,11 +451,14 @@ Apache SIS is a toolkit for describing l
<docencoding>${website.encoding}</docencoding> <!-- Encoding of the generated HTML files. -->
<charset>${website.encoding}</charset> <!-- Encoding to declare in the HTML META tag. -->
<locale>${website.locale}</locale> <!-- Locale for navigation bar, help file contents, etc. -->
+ <version>false</version> <!-- Excludes the version text in the generated docs. -->
+ <nosince>true</nosince> <!-- Omits the "Since" sections associated with the since tags. -->
<noqualifier>all</noqualifier> <!-- Omit qualifying package name before class names in output. -->
<quiet>true</quiet> <!-- Shuts off non-error and non-warning messages. -->
<keywords>true</keywords> <!-- Adds HTML meta keyword tags to the generated files. -->
<breakiterator>true</breakiterator> <!-- Better boundary detection when determining the end of the first sentence. -->
<stylesheetfile>src/main/javadoc/stylesheet.css</stylesheetfile>
+ <validateLinks>true</validateLinks>
<links>
<link>http://www.geoapi.org/3.0/javadoc</link>
</links>
Modified: sis/trunk/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Module.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Module.java?rev=1400654&r1=1400653&r2=1400654&view=diff
==============================================================================
--- sis/trunk/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Module.java (original)
+++ sis/trunk/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Module.java Sun Oct 21 14:21:40 2012
@@ -174,10 +174,11 @@ public final class Module implements Tag
*/
@Override
public String toString(final Tag[] tags) {
- if (tags==null || tags.length==0) {
+ if (tags == null || tags.length == 0) {
return "";
}
- final StringBuilder buffer = new StringBuilder("\n<dt><b>Module:</b></dt>");
+ final StringBuilder buffer = new StringBuilder(128);
+ buffer.append("\n<p><font size=\"-1\">");
for (int i=0; i<tags.length; i++) {
final Tag tag = tags[i];
File file = tag.position().file();
@@ -192,14 +193,11 @@ public final class Module implements Tag
break;
}
}
- buffer.append('\n').append(i==0 ? "<dd>" : "<br>")
- .append("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">" +
- "<tr>\n<td align=\"left\">");
/*
* Appends the module link.
*/
- buffer.append("<a href=\"").append(MAVEN_REPORTS_BASE_URL).append(module)
- .append("/index.html\">").append(module).append("</a>");
+ buffer.append("Defined in the <a href=\"").append(MAVEN_REPORTS_BASE_URL).append(module)
+ .append("/index.html\">").append(module).append("</a> module");
/*
* Appends the "(download binary)" link.
*/
@@ -209,7 +207,6 @@ public final class Module implements Tag
/*
* Appends the "View source code for this class" link.
*/
- buffer.append("\n</td><td align=\"right\">\n");
final Doc holder = tag.holder();
if (holder instanceof ClassDoc) {
ClassDoc outer, doc = (ClassDoc) holder;
@@ -217,15 +214,14 @@ public final class Module implements Tag
doc = outer;
}
final String className = doc.qualifiedName();
- buffer.append(" <a href=\"");
+ buffer.append("<br><a href=\"");
for (int j=className.indexOf('.'); j>=0; j=className.indexOf('.', j+1)) {
buffer.append("../");
}
buffer.append("../xref/").append(className.replace('.', '/'))
.append(".html\">View source code for this class</a>");
}
- buffer.append("\n</td></tr></table>");
}
- return buffer.append("</dd>\n").toString();
+ return buffer.append("</font></p>\n").toString();
}
}
Modified: sis/trunk/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Section.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Section.java?rev=1400654&r1=1400653&r2=1400654&view=diff
==============================================================================
--- sis/trunk/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Section.java (original)
+++ sis/trunk/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Section.java Sun Oct 21 14:21:40 2012
@@ -77,19 +77,17 @@ public final class Section extends Inlin
@Override
public String toString(final Tag tag) {
final Doc holder = tag.holder();
- final boolean small = holder == null || holder.isField() || holder.isMethod() || holder.isConstructor();
- final StringBuilder buffer = new StringBuilder("<p>");
- if (!small) {
- buffer.append("<br>");
- }
- buffer.append("\n<b><u>");
- if (!small) {
- buffer.append("<font size=+1>");
- }
- buffer.append(tag.text());
- if (!small) {
- buffer.append("</font>");
- }
- return buffer.append("</u></b><br>").toString();
+ final boolean small = (holder == null)
+ || holder.isEnumConstant()
+ || holder.isField()
+ || holder.isMethod()
+ || holder.isConstructor();
+ final String text = tag.text();
+ final StringBuilder buffer = new StringBuilder(text.length() + 8);
+ buffer.append('\n')
+ .append(small ? "<h6>" : "<h5>")
+ .append(text)
+ .append(small ? "</h6>" : "</h5>");
+ return buffer.toString();
}
}
Modified: sis/trunk/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java?rev=1400654&r1=1400653&r2=1400654&view=diff
==============================================================================
--- sis/trunk/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java (original)
+++ sis/trunk/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java Sun Oct 21 14:21:40 2012
@@ -39,8 +39,8 @@ import static org.apache.sis.util.collec
* {@section Guidline for implementors}
* Subclasses should follow the pattern below for every {@code get} and {@code set} methods,
* with a different processing for singleton value or for {@linkplain Collection collections}.
- * <p>
- * For singleton value:
+ *
+ * <p>For singleton value:</p>
*
* {@preformat java
* private Foo property;
@@ -116,7 +116,7 @@ public abstract class ModifiableMetadata
/**
* Copies the content of one list ({@code source}) into an other ({@code target}).
* This method performs the following steps:
- * <p>
+ *
* <ul>
* <li>Invokes {@link #checkWritePermission()} in order to ensure that this metadata is
* modifiable.</li>
@@ -161,7 +161,7 @@ public abstract class ModifiableMetadata
/**
* Copies the content of one Set ({@code source}) into an other ({@code target}).
* This method performs the following steps:
- * <p>
+ *
* <ul>
* <li>Invokes {@link #checkWritePermission()} in order to ensure that this metadata is
* modifiable.</li>
@@ -206,7 +206,7 @@ public abstract class ModifiableMetadata
/**
* Copies the content of one collection ({@code source}) into an other ({@code target}).
* This method performs the following steps:
- * <p>
+ *
* <ul>
* <li>Invokes {@link #checkWritePermission()} in order to ensure that this metadata is
* modifiable.</li>
@@ -421,12 +421,12 @@ public abstract class ModifiableMetadata
* return only two values: <code>{@linkplain Set}.class</code> if the attribute should not
* accept duplicated values, or <code>{@linkplain List}.class</code> otherwise. Future SIS
* versions may accept other types.
- * <p>
- * The default implementation returns <code>{@linkplain Set}.class</code> if the element type
+ *
+ * <p>The default implementation returns <code>{@linkplain Set}.class</code> if the element type
* is assignable to {@link Enum} or {@link CodeList}, and <code>{@linkplain List}.class</code>
* otherwise. Subclasses can override this method for choosing different kind of collections.
* <em>Note however that {@link Set} should be used only with immutable element types</em>,
- * for {@linkplain Object#hashCode() hash code} stability.
+ * for {@linkplain Object#hashCode() hash code} stability.</p>
*
* @param <E> The type of elements in the collection to be created.
* @param elementType The type of elements in the collection to be created.
Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java?rev=1400654&r1=1400653&r2=1400654&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java Sun Oct 21 14:21:40 2012
@@ -50,7 +50,7 @@ import static org.apache.sis.util.collec
* The collection shall not contains more than one identifier for the same
* {@linkplain Identifier#getAuthority() authority}. Nevertheless if such duplication
* is found, then this map implementation applies the following rules:
- * <p>
+ *
* <ul>
* <li>All getter methods (including the iterators and the values returned by the {@code put}
* and {@code remove} methods) return only the identifier code associated to the first
@@ -389,13 +389,13 @@ public class IdentifierMapAdapter extend
* The iterator over the (<var>citation</var>, <var>code</var>) entries. This iterator is
* created by the {@link IdentifierMap.Entries} collection. It extends {@link HashMap} as
* an opportunist implementation strategy, but users don't need to know this detail.
- * <p>
- * This iterator supports the {@link #remove()} operation if the underlying collection
- * supports it.
- * <p>
- * The map entries are used as a safety against duplicated authority values. The map values are
- * non-null only after we iterated over an authority. Then the value is {@link Boolean#TRUE} if
- * the identifier has been removed, of {@code Boolean#FALSE} otherwise.
+ *
+ * <p>This iterator supports the {@link #remove()} operation if the underlying collection
+ * supports it.</p>
+ *
+ * <p>The map entries are used as a safety against duplicated authority values. The map values
+ * are non-null only after we iterated over an authority. Then the value is {@link Boolean#TRUE}
+ * if the identifier has been removed, of {@code Boolean#FALSE} otherwise.</p>
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.3 (derived from geotk-3.18)
Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java?rev=1400654&r1=1400653&r2=1400654&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java Sun Oct 21 14:21:40 2012
@@ -33,7 +33,7 @@ import org.apache.sis.internal.util.Obje
* The identifiers for the following authorities are handled in a special way.
* See usages of {@link #isSpecialCase(Citation)} for spotting the code where
* a special handling is applied.
- * <p>
+ *
* <ul>
* <li>{@link IdentifierSpace#HREF}, handled as a shortcut to {@link XLink#getHRef()}.</li>
* </ul>
Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java?rev=1400654&r1=1400653&r2=1400654&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java Sun Oct 21 14:21:40 2012
@@ -34,18 +34,18 @@ import static org.apache.sis.util.collec
* The {@linkplain Identifier#getAuthority() authority of identifiers} that are not expected to be
* marshalled in a {@code MD_Identifier} XML element. Those identifiers are also excluded from the
* tree formatted by {@link org.apache.sis.metadata.AbstractMetadata#asTree()}.
- * <p>
- * There is two kinds of non-marshalled identifiers:
+ *
+ * <p>There is two kinds of non-marshalled identifiers:</p>
*
* <ul>
- * <li><p>The XML attributes declared by ISO 19139 specification in the {@code gco:PropertyType}
+ * <li>The XML attributes declared by ISO 19139 specification in the {@code gco:PropertyType}
* element: {@code gml:id}, {@code gco:uuid} and {@code xlink:href}. Those attributes are not
* part of the ISO 19115 specification. Those authorities are declared in the
- * {@link IdentifierSpace} interfaces.</p></li>
+ * {@link IdentifierSpace} interfaces.</li>
*
- * <li><p>ISO 19115 attributes that we choose, for the SIS implementation, to merge with
+ * <li>ISO 19115 attributes that we choose, for the SIS implementation, to merge with
* other identifiers: ISBN and ISSN codes. Those attributes are declared in the
- * {@link org.apache.sis.metadata.iso.citation.Citations} class.</p></li>
+ * {@link org.apache.sis.metadata.iso.citation.Citations} class.</li>
* </ul>
*
* In the current SIS library, there is different places where identifiers are filtered on the
@@ -83,10 +83,10 @@ public final class NonMarshalledAuthorit
/**
* Ordinal values for switch statements, as one of the {@link #ID}, {@link #UUID},
* <i>etc.</i> constants.
- * <p>
- * This value is not serialized because its value may not be consistent between different
- * versions of the SIS library (the attribute name is more reliable). This instance
- * should be replaced by one of the exiting constants at deserialization time anyway.
+ *
+ * <p>This value is not serialized because its value may not be consistent between different
+ * versions of the SIS library (the attribute name is more reliable). This instance should
+ * be replaced by one of the exiting constants at deserialization time anyway.</p>
*/
final transient int ordinal;
Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/DaemonThread.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/DaemonThread.java?rev=1400654&r1=1400653&r2=1400654&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/DaemonThread.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/DaemonThread.java Sun Oct 21 14:21:40 2012
@@ -60,11 +60,11 @@ abstract class DaemonThread extends Thre
/**
* Creates a new daemon thread. This constructor sets the daemon flag to {@code true}.
- * <p>
- * We need to maintain a list of daemon threads created by each SIS module in order to
+ *
+ * <p>We need to maintain a list of daemon threads created by each SIS module in order to
* kill them at shutdown time (not strictly necessary for pure JSEE applications, but
* required in OSGi environment). Each module using {@code DaemonThread} shall maintain
- * its <strong>own</strong> list (don't use the list of another module), like below:
+ * its <strong>own</strong> list (don't use the list of another module), like below:</p>
*
* {@preformat java
* class MyInternalClass {
@@ -113,9 +113,9 @@ abstract class DaemonThread extends Thre
/**
* Sends a kill signal to all threads in the chain starting by the given thread,
* and waits for the threads to die before to return.
- * <p>
- * <strong>This method is for internal use by Apache SIS shutdown hooks only.</strong>
- * Users should never invoke this method explicitely.
+ *
+ * <p><strong>This method is for internal use by Apache SIS shutdown hooks only.</strong>
+ * Users should never invoke this method explicitely.</p>
*
* @param first The first thread in the chain of threads to kill.
* @param stopWaitingAt A {@link System#nanoTime()} value telling when to stop waiting.
Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/Executors.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/Executors.java?rev=1400654&r1=1400653&r2=1400654&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/Executors.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/Executors.java Sun Oct 21 14:21:40 2012
@@ -31,7 +31,7 @@ import org.apache.sis.util.Static;
* This class extends {@link ThreadFactory} and {@link RejectedExecutionHandler} for opportunist
* reasons. Developers shall ignore this implementation detail, which may change at any time.
* The methods for use in this class are:
- * <p>
+ *
* <ul>
* <li>{@link #executeDaemonTask(Runnable)}</li>
* <li>{@link #createThreadFactory(String)}</li>
Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/ReferenceQueueConsumer.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/ReferenceQueueConsumer.java?rev=1400654&r1=1400653&r2=1400654&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/ReferenceQueueConsumer.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/ReferenceQueueConsumer.java Sun Oct 21 14:21:40 2012
@@ -29,7 +29,7 @@ import org.apache.sis.util.logging.Loggi
* are consumed. This thread will invoke the {@link Disposeable#dispose()} method for each
* references enqueued by the garbage collector. Those references <strong>must</strong>
* implement the {@link Disposable} interface.
- * <p>
+ *
* Example:
*
* {@preformat java
@@ -80,8 +80,8 @@ public final class ReferenceQueueConsume
* It will run only only a few nanoseconds every time a new {@link Reference} is enqueued.
*
* {@note We give to this thread a priority higher than the normal one since this thread shall
- * execute only tasks to be completed very shortly. Quick execution of those tasks is at the
- * benefit of the rest of the system, since they make more resources available sooner.}
+ * execute only tasks to be completed very shortly. Quick execution of those tasks is at
+ * the benefit of the rest of the system, since they make more resources available sooner.}
*/
private ReferenceQueueConsumer(final DaemonThread lastCreatedDaemon) {
super(Threads.DAEMONS, "ReferenceQueueConsumer", lastCreatedDaemon);
Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/Threads.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/Threads.java?rev=1400654&r1=1400653&r2=1400654&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/Threads.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/internal/util/Threads.java Sun Oct 21 14:21:40 2012
@@ -90,9 +90,9 @@ final class Threads extends Static {
/**
* Sends a kill signal to all daemon threads created by the {@code sis-utility} module,
* and waits for the threads to die before to return.
- * <p>
- * <strong>This method is for internal use by Apache SIS shutdown hooks only.</strong>
- * Users should never invoke this method explicitely.
+ *
+ * <p><strong>This method is for internal use by Apache SIS shutdown hooks only.</strong>
+ * Users should never invoke this method explicitely.</p>
*
* @param stopWaitingAt A {@link System#nanoTime()} value telling when to stop waiting.
* This is used for preventing shutdown process to block an indefinite amount of time.
Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java?rev=1400654&r1=1400653&r2=1400654&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java Sun Oct 21 14:21:40 2012
@@ -36,7 +36,7 @@ import static org.apache.sis.util.Arrays
* Some methods in this class are very similar to the standard {@link Math} methods
* or could be implemented with straightforward formulas.
* However the methods in this class put an emphasis on:
- * <p>
+ *
* <ul>
* <li>Rounding errors:
* {@link #magnitude(double[]) magnitude},
@@ -50,7 +50,7 @@ import static org.apache.sis.util.Arrays
* {@link #toNanFloat(int) toNanFloat},
* {@link #toNanOrdinal(float) toNanOrdinal}.</li>
* </ul>
- * <p>
+ *
* Some additional functions not found in {@code Math} are:
* {@link #atanh(double) atanh},
* {@link #nextPrimeNumber(int) nextPrimeNumber}.
@@ -122,8 +122,8 @@ public final class MathFunctions extends
* change in any future Apache SIS version.
*
* {@note The current value is the highest prime number representable as an unsigned 16 bits
- * integer. This is enough for current needs because 16 bits prime numbers are sufficient for
- * finding the divisors of any 32 bits integers.}
+ * integer. This is enough for current needs because 16 bits prime numbers are sufficient
+ * for finding the divisors of any 32 bits integers.}
*
* @see #nextPrimeNumber(int)
*/
@@ -228,10 +228,11 @@ public final class MathFunctions extends
* sometime at the cost of performance.
*
* {@note This method has been defined because the standard <code>Math.pow(10, x)</code>
- * method does not always return the closest IEEE floating point representation. Slight
- * departures (1 or 2 ULP) are often allowed in math functions for performance reasons.
- * The most accurate calculations are usually not necessary, but the base 10 is a special
- * case since it is used for scaling axes or formatting human-readable output.}
+ * method does not always return the closest IEEE floating point representation.
+ * Slight departures (1 or 2 ULP) are often allowed in math functions for performance
+ * reasons. The most accurate calculations are usually not necessary, but the base 10
+ * is a special case since it is used for scaling axes or formatting human-readable
+ * output.}
*
* @param x The exponent.
* @return 10 raised to the given exponent.
@@ -264,8 +265,8 @@ public final class MathFunctions extends
* Returns the inverse hyperbolic tangent of the given value.
* This is the inverse of the {@linkplain Math#tanh(double) tanh} method.
* The range of input values shall be in the [-1 ⦠1].
- * <p>
* Special cases:
+ *
* <ul>
* <li>For <var>x</var> = NaN, this method returns a {@linkplain Double#isNaN(double) NaN} value.</li>
* <li>For <var>x</var> = -1, this method returns {@linkplain Double#NEGATIVE_INFINITY negative infinity}.</li>
@@ -287,17 +288,17 @@ public final class MathFunctions extends
/**
* Returns {@code true} if the given value is positive, <em>excluding</em> negative zero.
- * <p>
* Special cases:
+ *
* <ul>
* <li>If the value is {@code +0.0}, returns {@code true}</li>
* <li>If the value is {@code -0.0}, returns <b>{@code false}</b></li>
* <li>If the value is {@link Double#isNaN(double) NaN}, returns {@code false}</li>
* </ul>
- * <p>
+ *
* As seen from the above cases, this method distinguishes positive zero from negative zero.
* The handling of zero values is the difference between invoking {@code isPositive(double)}
- * and testing if (<var>value</var> >= 0).
+ * and testing if (<var>value</var> {@literal >= 0}).
*
* @param value The value to test.
* @return {@code true} if the given value is positive, excluding negative zero.
@@ -308,17 +309,17 @@ public final class MathFunctions extends
/**
* Returns {@code true} if the given value is negative, <em>including</em> negative zero.
- * <p>
* Special cases:
+ *
* <ul>
* <li>If the value is {@code +0.0}, returns {@code false}</li>
* <li>If the value is {@code -0.0}, returns <b>{@code true}</b></li>
* <li>If the value is {@link Double#isNaN(double) NaN}, returns {@code false}</li>
* </ul>
- * <p>
+ *
* As seen from the above cases, this method distinguishes positive zero from negative zero.
* The handling of zero values is the difference between invoking {@code isNegative(double)}
- * and testing if (<var>value</var> < 0).
+ * and testing if (<var>value</var> {@literal < 0}).
*
* @param value The value to test.
* @return {@code true} if the given value is negative, including negative zero.
@@ -330,13 +331,12 @@ public final class MathFunctions extends
/**
* Returns {@code true} if the given values have the same sign, differentiating positive
* and negative zeros.
- * <p>
* Special cases:
+ *
* <ul>
* <li>{@code +0.0} and {@code -0.0} are considered to have opposite sign</li>
* <li>If any value is {@link Double#isNaN(double) NaN}, returns {@code false}</li>
* </ul>
- * <p>
*
* @param v1 The first value.
* @param v2 The second value, to compare the sign with the first value.
@@ -354,9 +354,9 @@ public final class MathFunctions extends
* argument is negative. This method is similar to <code>{@linkplain Math#copySign(double,double)
* Math.copySign}(value, sign)</code> except that the sign is combined with an <cite>exclusive
* or</cite> operation instead than being copied.
- * <p>
- * This method makes no guarantee about whether {@code NaN} values are handled as positive
- * or negative numbers. This is the same policy than {@link Math#copySign(double, double)}.
+ *
+ * <p>This method makes no guarantee about whether {@code NaN} values are handled as positive
+ * or negative numbers. This is the same policy than {@link Math#copySign(double, double)}.</p>
*
* @param value The parameter providing the value that may need a sign change.
* @param sign The parameter providing the sign to <cite>xor</cite> with the value.
@@ -467,13 +467,13 @@ public final class MathFunctions extends
* Returns a {@linkplain Float#isNaN(float) NaN} number for the specified ordinal value.
* Valid NaN numbers in Java can have bit fields in the ranges listed below.
* This method allocates one of valid NaN bit fields to each ordinal value.
- * <p>
+ *
* <ul>
* <li>[{@code 0x7F800001} ⦠{@code 0x7FFFFFFF}], with
* {@code 0x7FC00000} as the bit fields of the standard {@link Float#NaN} value</li>
* <li>[{@code 0xFF800001} ⦠{@code 0xFFFFFFFF}]</li>
* </ul>
- * <p>
+ *
* The relationship between bit fields and ordinal values is implementation dependent and may
* change in any future version of the SIS library. The current implementation restricts the
* range of allowed ordinal values to a smaller one than the range of all possible NaN values.
Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java?rev=1400654&r1=1400653&r2=1400654&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java Sun Oct 21 14:21:40 2012
@@ -25,7 +25,7 @@ import org.apache.sis.util.resources.Err
/**
* Static methods for performing argument checks.
* Every methods in this class can throw one of the following exceptions:
- * <p>
+ *
* <table class="sis">
* <tr><th>Exception</th><th class="sep">Thrown by</th></tr>
* <tr><td>{@link NullArgumentException}</td>
@@ -165,6 +165,8 @@ public final class ArgumentChecks extend
* @param index The index to check.
* @throws IndexOutOfBoundsException If the given index is negative or not lower than the
* given upper value.
+ *
+ * @see #ensurePositive(String, int)
*/
public static void ensureValidIndex(final int upper, final int index) throws IndexOutOfBoundsException {
if (index < 0 || index >= upper) {
@@ -173,6 +175,30 @@ public final class ArgumentChecks extend
}
/**
+ * Ensures that the given index range is valid for a sequence of the given length.
+ * This method is designed for methods that expect an index range as their only arguments.
+ * For this reason, this method does not take argument names.
+ *
+ * <p>This method verifies only the {@code lower} and {@code upper} argument values.
+ * It does not <strong>not</strong> verify the validity of the {@code length} argument,
+ * because this information is assumed to be provided by the implementation rather than
+ * the user.</p>
+ *
+ * @param length The length of the sequence (array, {@link CharSequence}, <i>etc.</i>).
+ * @param lower The user-specified lower index, inclusive.
+ * @param upper The user-specified upper index, exclusive.
+ * @throws IndexOutOfBoundsException If the given [{@code lower} ⦠{@code upper}]
+ * range is out of the sequence index range.
+ *
+ * @see #ensureBetween(String, int, int, int)
+ */
+ public static void ensureValidIndexRange(final int length, final int lower, final int upper) throws IndexOutOfBoundsException {
+ if (lower < 0 || upper < lower || upper > length) {
+ throw new IndexOutOfBoundsException(Errors.format(Errors.Keys.IllegalRange_2, lower, upper));
+ }
+ }
+
+ /**
* Ensures that the given integer value is greater than or equals to zero.
* This method is used for checking values that are <strong>not</strong> index.
* For checking index values, use {@link #ensureValidIndex(int, int)} instead.
@@ -180,6 +206,9 @@ public final class ArgumentChecks extend
* @param name The name of the argument to be checked, used only if an exception is thrown.
* @param value The user argument to check.
* @throws IllegalArgumentException if the given value is negative.
+ *
+ * @see #ensureValidIndex(int, int)
+ * @see #ensureStrictlyPositive(String, int)
*/
public static void ensurePositive(final String name, final int value)
throws IllegalArgumentException
@@ -196,6 +225,8 @@ public final class ArgumentChecks extend
* @param name The name of the argument to be checked, used only if an exception is thrown.
* @param value The user argument to check.
* @throws IllegalArgumentException if the given value is negative.
+ *
+ * @see #ensureStrictlyPositive(String, long)
*/
public static void ensurePositive(final String name, final long value)
throws IllegalArgumentException
@@ -214,6 +245,8 @@ public final class ArgumentChecks extend
* @param name The name of the argument to be checked, used only if an exception is thrown.
* @param value The user argument to check.
* @throws IllegalArgumentException if the given value is {@linkplain Float#NaN NaN} or negative.
+ *
+ * @see #ensureStrictlyPositive(String, float)
*/
public static void ensurePositive(final String name, final float value)
throws IllegalArgumentException
@@ -233,6 +266,8 @@ public final class ArgumentChecks extend
* @param name The name of the argument to be checked, used only if an exception is thrown.
* @param value The user argument to check.
* @throws IllegalArgumentException if the given value is {@linkplain Double#NaN NaN} or negative.
+ *
+ * @see #ensureStrictlyPositive(String, double)
*/
public static void ensurePositive(final String name, final double value)
throws IllegalArgumentException
@@ -250,6 +285,8 @@ public final class ArgumentChecks extend
* @param name The name of the argument to be checked, used only if an exception is thrown.
* @param value The user argument to check.
* @throws IllegalArgumentException if the given value is negative or equals to zero.
+ *
+ * @see #ensurePositive(String, int)
*/
public static void ensureStrictlyPositive(final String name, final int value)
throws IllegalArgumentException
@@ -266,6 +303,8 @@ public final class ArgumentChecks extend
* @param name The name of the argument to be checked, used only if an exception is thrown.
* @param value The user argument to check.
* @throws IllegalArgumentException if the given value is negative or equals to zero.
+ *
+ * @see #ensurePositive(String, long)
*/
public static void ensureStrictlyPositive(final String name, final long value)
throws IllegalArgumentException
@@ -285,6 +324,8 @@ public final class ArgumentChecks extend
* @param value The user argument to check.
* @throws IllegalArgumentException if the given value is {@linkplain Float#NaN NaN},
* zero or negative.
+ *
+ * @see #ensurePositive(String, float)
*/
public static void ensureStrictlyPositive(final String name, final float value)
throws IllegalArgumentException
@@ -305,6 +346,8 @@ public final class ArgumentChecks extend
* @param value The user argument to check.
* @throws IllegalArgumentException if the given value is {@linkplain Double#NaN NaN},
* zero or negative.
+ *
+ * @see #ensurePositive(String, double)
*/
public static void ensureStrictlyPositive(final String name, final double value)
throws IllegalArgumentException
@@ -324,6 +367,8 @@ public final class ArgumentChecks extend
* @param max The maximal value, inclusive.
* @param value The value to be tested.
* @throws IllegalArgumentException if the given value is not in the given range.
+ *
+ * @see #ensureValidIndexRange(int, int, int)
*/
public static void ensureBetween(final String name, final int min, final int max, final int value)
throws IllegalArgumentException
@@ -397,12 +442,12 @@ public final class ArgumentChecks extend
* This method does nothing if the given direct position is null.
*
* @param name The name of the argument to be checked. Used only in case an exception is thrown.
- * @param position The direct position to check for its dimension.
* @param expected The expected number of dimensions.
+ * @param position The direct position to check for its dimension, or {@code null}.
* @throws MismatchedDimensionException If the given direct position is non-null and does
* not have the expected number of dimensions.
*/
- public static void ensureDimensionMatches(final String name, final DirectPosition position, final int expected)
+ public static void ensureDimensionMatches(final String name, final int expected, final DirectPosition position)
throws MismatchedDimensionException
{
if (position != null) {
Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Arrays.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Arrays.java?rev=1400654&r1=1400653&r2=1400654&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Arrays.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Arrays.java Sun Oct 21 14:21:40 2012
@@ -28,7 +28,7 @@ import org.apache.sis.internal.util.Obje
* Static methods for simple operations on arrays and array elements. This class provides methods
* for inserting and deleting elements in an array, as well as resizing the array. Some worthy
* methods are:
- * <p>
+ *
* <ul>
* <li>The {@link #resize(Object[], int) resize} methods, which are very similar to the
* {@link java.util.Arrays#copyOf(Object[], int) Arrays.copyOf} methods except that
@@ -43,15 +43,15 @@ import org.apache.sis.internal.util.Obje
* {@section Handling of null values}
* Many (but not all) methods in this class are tolerant to null parameter values,
* sometime under certain conditions. See the method javadoc for details.
- * <p>
- * All methods in this class are tolerant to null elements in arrays.
- * Null and {@linkplain Double#NaN NaN} elements are ignored.
+ *
+ * <p>All methods in this class are tolerant to null elements in arrays.
+ * Null and {@linkplain Double#NaN NaN} elements are ignored.</p>
*
* {@section Performance consideration}
* The methods listed below are provided as convenience for <strong>casual</strong> use on
* <strong>small</strong> arrays. For large arrays or for frequent use, consider using the
* Java collection framework instead.
- * <p>
+ *
* <table class="sis">
* <tr><th>Method</th> <th class="sep">Alternative</th></tr>
* <tr><td>{@link #resize(Object[], int)}</td> <td class="sep">{@link java.util.ArrayList}</td></tr>
@@ -62,7 +62,7 @@ import org.apache.sis.internal.util.Obje
* <tr><td>{@link #contains(Object[], Object)}</td> <td class="sep">{@link java.util.HashSet}</td></tr>
* <tr><td>{@link #containsIdentity(Object[], Object)}</td> <td class="sep">{@link java.util.IdentityHashMap}</td></tr>
* </table>
- * <p>
+ *
* Note that this recommendation applies mostly to arrays of objects. It may not apply to arrays
* of primitive types, since as of JDK7 the collection framework wraps every primitive types in
* objects.
@@ -132,21 +132,22 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements as the given {@code array} but with the
* specified {@code length}, truncating or padding with {@code null} if necessary.
+ *
* <ul>
- * <li><p>If the given {@code length} is longer than the length of the given {@code array},
+ * <li>If the given {@code length} is longer than the length of the given {@code array},
* then the returned array will contain all the elements of {@code array} at index
- * <var>i</var> < {@code array.length}. Elements at index
- * <var>i</var> >= {@code array.length} are initialized to {@code null}.</p></li>
+ * <var>i</var>Â {@literal <}Â {@code array.length}. Elements at index
+ * <var>i</var>Â {@literal >=}Â {@code array.length} are initialized to {@code null}.</li>
*
- * <li><p>If the given {@code length} is shorter than the length of the given {@code array},
+ * <li>If the given {@code length} is shorter than the length of the given {@code array},
* then the returned array will contain only the elements of {@code array} at index
- * <var>i</var> < {@code length}. Remaining elements are not copied.</p></li>
+ * <var>i</var>Â {@literal <}Â {@code length}. Remaining elements are not copied.</li>
*
- * <li><p>If the given {@code length} is equal to the length of the given {@code array},
+ * <li>If the given {@code length} is equal to the length of the given {@code array},
* then {@code array} is returned unchanged. <strong>No copy</strong> is performed.
- * This behavior is different than the {@link java.util.Arrays#copyOf} one.</p></li>
+ * This behavior is different than the {@link java.util.Arrays#copyOf} one.</li>
* </ul>
- * <p>
+ *
* Note that if the given array is {@code null}, then this method unconditionally returns
* {@code null}Â no matter the value of the {@code length} argument.
*
@@ -166,9 +167,9 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements as the given {@code array} but
* specified {@code length}, truncating or padding with zeros if necessary.
- * <p>
- * This method returns {@code null} if and only if the given array is {@code null},
- * in which case the value of the {@code length} argument is ignored.
+ *
+ * <p>This method returns {@code null} if and only if the given array is {@code null},
+ * in which case the value of the {@code length} argument is ignored.</p>
*
* @param array Array to resize, or {@code null}.
* @param length Length of the desired array.
@@ -193,9 +194,9 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements as the given {@code array} but
* specified {@code length}, truncating or padding with zeros if necessary.
- * <p>
- * This method returns {@code null} if and only if the given array is {@code null},
- * in which case the value of the {@code length} argument is ignored.
+ *
+ * <p>This method returns {@code null} if and only if the given array is {@code null},
+ * in which case the value of the {@code length} argument is ignored.</p>
*
* @param array Array to resize, or {@code null}.
* @param length Length of the desired array.
@@ -220,9 +221,9 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements as the given {@code array} but
* specified {@code length}, truncating or padding with zeros if necessary.
- * <p>
- * This method returns {@code null} if and only if the given array is {@code null},
- * in which case the value of the {@code length} argument is ignored.
+ *
+ * <p>This method returns {@code null} if and only if the given array is {@code null},
+ * in which case the value of the {@code length} argument is ignored.</p>
*
* @param array Array to resize, or {@code null}.
* @param length Length of the desired array.
@@ -247,9 +248,9 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements as the given {@code array} but
* specified {@code length}, truncating or padding with zeros if necessary.
- * <p>
- * This method returns {@code null} if and only if the given array is {@code null},
- * in which case the value of the {@code length} argument is ignored.
+ *
+ * <p>This method returns {@code null} if and only if the given array is {@code null},
+ * in which case the value of the {@code length} argument is ignored.</p>
*
* @param array Array to resize, or {@code null}.
* @param length Length of the desired array.
@@ -274,9 +275,9 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements as the given {@code array} but
* specified {@code length}, truncating or padding with zeros if necessary.
- * <p>
- * This method returns {@code null} if and only if the given array is {@code null},
- * in which case the value of the {@code length} argument is ignored.
+ *
+ * <p>This method returns {@code null} if and only if the given array is {@code null},
+ * in which case the value of the {@code length} argument is ignored.</p>
*
* @param array Array to resize, or {@code null}.
* @param length Length of the desired array.
@@ -301,9 +302,9 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements as the given {@code array} but
* specified {@code length}, truncating or padding with zeros if necessary.
- * <p>
- * This method returns {@code null} if and only if the given array is {@code null},
- * in which case the value of the {@code length} argument is ignored.
+ *
+ * <p>This method returns {@code null} if and only if the given array is {@code null},
+ * in which case the value of the {@code length} argument is ignored.</p>
*
* @param array Array to resize, or {@code null}.
* @param length Length of the desired array.
@@ -328,9 +329,9 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements as the given {@code array} but
* specified {@code length}, truncating or padding with zeros if necessary.
- * <p>
- * This method returns {@code null} if and only if the given array is {@code null},
- * in which case the value of the {@code length} argument is ignored.
+ *
+ * <p>This method returns {@code null} if and only if the given array is {@code null},
+ * in which case the value of the {@code length} argument is ignored.</p>
*
* @param array Array to resize, or {@code null}.
* @param length Length of the desired array.
@@ -355,9 +356,9 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements as the given {@code array} but
* specified {@code length}, truncating or padding with {@code false} if necessary.
- * <p>
- * This method returns {@code null} if and only if the given array is {@code null},
- * in which case the value of the {@code length} argument is ignored.
+ *
+ * <p>This method returns {@code null} if and only if the given array is {@code null},
+ * in which case the value of the {@code length} argument is ignored.</p>
*
* @param array Array to resize, or {@code null}.
* @param length Length of the desired array.
@@ -382,10 +383,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array except for
* the given range.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array.
- * In every cases, the given array is never modified.
+ * In every cases, the given array is never modified.</p>
*
* @param <T> The array type.
* @param array Array from which to remove elements. Can be {@code null} only if {@code length} is 0.
@@ -416,10 +417,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array except for
* the given range.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns
* the {@code array} reference unchanged (except if empty). Otherwise this method
- * creates a new array. In every cases, the given array is never modified.
+ * creates a new array. In every cases, the given array is never modified.</p>
*
* @param <E> The type of array elements.
* @param array Array from which to remove elements. Can be {@code null} only if {@code length} is 0.
@@ -442,10 +443,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array except for
* the given range.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_DOUBLE empty} arrays. Otherwise
- * this method creates a new array. In every cases, the given array is never modified.
+ * this method creates a new array. In every cases, the given array is never modified.</p>
*
* @param array Array from which to remove elements. Can be {@code null} only if {@code length} is 0.
* @param first Index of the first element to remove from the given {@code array}.
@@ -468,10 +469,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array except for
* the given range.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_FLOAT empty} arrays. Otherwise
- * this method creates a new array. In every cases, the given array is never modified.
+ * this method creates a new array. In every cases, the given array is never modified.</p>
*
* @param array Array from which to remove elements. Can be {@code null} only if {@code length} is 0.
* @param first Index of the first element to remove from the given {@code array}.
@@ -494,10 +495,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array except for
* the given range.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_LONG empty} arrays. Otherwise
- * this method creates a new array. In every cases, the given array is never modified.
+ * this method creates a new array. In every cases, the given array is never modified.</p>
*
* @param array Array from which to remove elements. Can be {@code null} only if {@code length} is 0.
* @param first Index of the first element to remove from the given {@code array}.
@@ -520,10 +521,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array except for
* the given range.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_INT empty} arrays. Otherwise
- * this method creates a new array. In every cases, the given array is never modified.
+ * this method creates a new array. In every cases, the given array is never modified.</p>
*
* @param array Array from which to remove elements. Can be {@code null} only if {@code length} is 0.
* @param first Index of the first element to remove from the given {@code array}.
@@ -546,10 +547,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array except for
* the given range.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_SHORT empty} arrays. Otherwise
- * this method creates a new array. In every cases, the given array is never modified.
+ * this method creates a new array. In every cases, the given array is never modified.</p>
*
* @param array Array from which to remove elements. Can be {@code null} only if {@code length} is 0.
* @param first Index of the first element to remove from the given {@code array}.
@@ -572,10 +573,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array except for
* the given range.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_BYTE empty} arrays. Otherwise
- * this method creates a new array. In every cases, the given array is never modified.
+ * this method creates a new array. In every cases, the given array is never modified.</p>
*
* @param array Array from which to remove elements. Can be {@code null} only if {@code length} is 0.
* @param first Index of the first element to remove from the given {@code array}.
@@ -598,10 +599,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array except for
* the given range.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_CHAR empty} arrays. Otherwise
- * this method creates a new array. In every cases, the given array is never modified.
+ * this method creates a new array. In every cases, the given array is never modified.</p>
*
* @param array Array from which to remove elements. Can be {@code null} only if {@code length} is 0.
* @param first Index of the first element to remove from the given {@code array}.
@@ -624,10 +625,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array except for
* the given range.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_BOOLEAN empty} arrays. Otherwise
- * this method creates a new array. In every cases, the given array is never modified.
+ * this method creates a new array. In every cases, the given array is never modified.</p>
*
* @param array Array from which to remove elements. Can be {@code null} only if {@code length} is 0.
* @param first Index of the first element to remove from the given {@code array}.
@@ -650,10 +651,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array, with additional
* "spaces" in the given range. These "spaces" will be made up of {@code null} elements.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given array is never modified.
+ * the given array is never modified.</p>
*
* @param <T> The array type.
* @param array Array in which to insert spaces. Can be {@code null} only if {@code length} is 0.
@@ -685,10 +686,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array, with additional
* "spaces" in the given range. These "spaces" will be made up of {@code null} elements.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given array is never modified.
+ * the given array is never modified.</p>
*
* @param <E> The type of array elements.
* @param array Array in which to insert spaces. Can be {@code null} only if {@code length} is 0.
@@ -714,10 +715,10 @@ public final class Arrays extends Static
* Returns an array containing the same elements than the given array, with additional
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to zero.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given array is never modified.
+ * the given array is never modified.</p>
*
* @param array Array in which to insert spaces. Can be {@code null} only if {@code length} is 0.
* @param first Index where the first space should be inserted. All {@code array} elements
@@ -742,10 +743,10 @@ public final class Arrays extends Static
* Returns an array containing the same elements than the given array, with additional
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to zero.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given array is never modified.
+ * the given array is never modified.</p>
*
* @param array Array in which to insert spaces. Can be {@code null} only if {@code length} is 0.
* @param first Index where the first space should be inserted. All {@code array} elements
@@ -770,10 +771,10 @@ public final class Arrays extends Static
* Returns an array containing the same elements than the given array, with additional
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to zero.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given array is never modified.
+ * the given array is never modified.</p>
*
* @param array Array in which to insert spaces. Can be {@code null} only if {@code length} is 0.
* @param first Index where the first space should be inserted. All {@code array} elements
@@ -798,10 +799,10 @@ public final class Arrays extends Static
* Returns an array containing the same elements than the given array, with additional
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to zero.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given array is never modified.
+ * the given array is never modified.</p>
*
* @param array Array in which to insert spaces. Can be {@code null} only if {@code length} is 0.
* @param first Index where the first space should be inserted. All {@code array} elements
@@ -826,10 +827,10 @@ public final class Arrays extends Static
* Returns an array containing the same elements than the given array, with additional
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to zero.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given array is never modified.
+ * the given array is never modified.</p>
*
* @param array Array in which to insert spaces. Can be {@code null} only if {@code length} is 0.
* @param first Index where the first space should be inserted. All {@code array} elements
@@ -854,10 +855,10 @@ public final class Arrays extends Static
* Returns an array containing the same elements than the given array, with additional
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to zero.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given array is never modified.
+ * the given array is never modified.</p>
*
* @param array Array in which to insert spaces. Can be {@code null} only if {@code length} is 0.
* @param first Index where the first space should be inserted. All {@code array} elements
@@ -882,10 +883,10 @@ public final class Arrays extends Static
* Returns an array containing the same elements than the given array, with additional
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to zero.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given array is never modified.
+ * the given array is never modified.</p>
*
* @param array Array in which to insert spaces. Can be {@code null} only if {@code length} is 0.
* @param first Index where the first space should be inserted. All {@code array} elements
@@ -910,10 +911,10 @@ public final class Arrays extends Static
* Returns an array containing the same elements than the given array, with additional
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to {@code false}.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code array}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given array is never modified.
+ * the given array is never modified.</p>
*
* @param array Array in which to insert spaces. Can be {@code null} only if {@code length} is 0.
* @param first Index where the first space should be inserted. All {@code array} elements
@@ -937,10 +938,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code dst}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given arrays are never modified.
+ * the given arrays are never modified.</p>
*
* @param <T> The arrays type.
* @param src Array to entirely or partially insert into {@code dst}.
@@ -981,10 +982,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code dst}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given arrays are never modified.
+ * the given arrays are never modified.</p>
*
* @param <E> The type of array elements.
* @param src Array to entirely or partially insert into {@code dst}.
@@ -1016,10 +1017,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code dst}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given arrays are never modified.
+ * the given arrays are never modified.</p>
*
* @param src Array to entirely or partially insert into {@code dst}.
* Can be null only if {@code length}Â is 0.
@@ -1050,10 +1051,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code dst}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given arrays are never modified.
+ * the given arrays are never modified.</p>
*
* @param src Array to entirely or partially insert into {@code dst}.
* Can be null only if {@code length}Â is 0.
@@ -1084,10 +1085,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code dst}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given arrays are never modified.
+ * the given arrays are never modified.</p>
*
* @param src Array to entirely or partially insert into {@code dst}.
* Can be null only if {@code length}Â is 0.
@@ -1118,10 +1119,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code dst}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given arrays are never modified.
+ * the given arrays are never modified.</p>
*
* @param src Array to entirely or partially insert into {@code dst}.
* Can be null only if {@code length}Â is 0.
@@ -1152,10 +1153,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code dst}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given arrays are never modified.
+ * the given arrays are never modified.</p>
*
* @param src Array to entirely or partially insert into {@code dst}.
* Can be null only if {@code length}Â is 0.
@@ -1186,10 +1187,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code dst}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given arrays are never modified.
+ * the given arrays are never modified.</p>
*
* @param src Array to entirely or partially insert into {@code dst}.
* Can be null only if {@code length}Â is 0.
@@ -1220,10 +1221,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code dst}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given arrays are never modified.
+ * the given arrays are never modified.</p>
*
* @param src Array to entirely or partially insert into {@code dst}.
* Can be null only if {@code length}Â is 0.
@@ -1254,10 +1255,10 @@ public final class Arrays extends Static
/**
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
- * <p>
- * If the {@code length}Â argument is 0, then this method returns the {@code dst}
+ *
+ * <p>If the {@code length}Â argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
- * the given arrays are never modified.
+ * the given arrays are never modified.</p>
*
* @param src Array to entirely or partially insert into {@code dst}.
* Can be null only if {@code length}Â is 0.
@@ -1309,15 +1310,15 @@ public final class Arrays extends Static
* Removes the duplicated elements in the given array. This method should be invoked
* only for small arrays, typically less than 10 distinct elements. For larger arrays,
* use {@link java.util.LinkedHashSet} instead.
- * <p>
- * This method compares all pair of elements using the {@link Objects#equals(Object, Object)}
+ *
+ * <p>This method compares all pair of elements using the {@link Objects#equals(Object, Object)}
* method - so null elements are allowed. If duplicated values are found, then only the first
* occurrence is retained; the second occurrence is removed in-place. After all elements have
* been compared, this method returns the number of remaining elements in the array. The free
- * space at the end of the array is padded with {@code null} values.
- * <p>
- * Callers can obtain an array of appropriate length using the following idiom.
- * Note that this idiom will create a new array only if necessary:
+ * space at the end of the array is padded with {@code null} values.</p>
+ *
+ * <p>Callers can obtain an array of appropriate length using the following idiom.
+ * Note that this idiom will create a new array only if necessary:</p>
*
* {@preformat java
* T[] array = ...;
@@ -1707,10 +1708,10 @@ public final class Arrays extends Static
/**
* Returns {@code true} if the specified array contains the specified reference.
* The comparisons are performed using the {@code ==} operator.
- * <p>
- * This method should be used only for very small arrays, or for searches to be performed
+ *
+ * <p>This method should be used only for very small arrays, or for searches to be performed
* only once, because it performs a linear search. If more than one search need to be done
- * on the same array, consider using {@link java.util.IdentityHashMap} instead.
+ * on the same array, consider using {@link java.util.IdentityHashMap} instead.</p>
*
* @param array The array to search in. May be {@code null} and may contains null elements.
* @param value The value to search. May be {@code null}.
@@ -1731,10 +1732,10 @@ public final class Arrays extends Static
/**
* Returns {@code true} if the specified array contains the specified value.
* The comparisons are performed using the {@link Object#equals(Object)} method.
- * <p>
- * This method should be used only for very small arrays, or for searches to be performed
+ *
+ * <p>This method should be used only for very small arrays, or for searches to be performed
* only once, because it performs a linear search. If more than one search need to be done
- * on the same array, consider using {@link java.util.HashSet} instead.
+ * on the same array, consider using {@link java.util.HashSet} instead.</p>
*
* @param array The array to search in. May be {@code null} and may contains null elements.
* @param value The value to search. May be {@code null}.
@@ -1758,10 +1759,10 @@ public final class Arrays extends Static
* Returns {@code true} if at least one element in the first array is {@linkplain Object#equals
* equals} to an element in the second array. The element doesn't need to be at the same index
* in both array.
- * <p>
- * This method should be used only for very small arrays since it may be very slow. If the
+ *
+ * <p>This method should be used only for very small arrays since it may be very slow. If the
* arrays are large or if an array will be involved in more than one search, consider using
- * {@link java.util.HashSet} instead.
+ * {@link java.util.HashSet} instead.</p>
*
* @param array1 The first array, or {@code null}.
* @param array2 The second array, or {@code null}.
@@ -1782,7 +1783,7 @@ public final class Arrays extends Static
/**
* Returns the concatenation of all given arrays. This method performs the following checks:
- * <p>
+ *
* <ul>
* <li>If the {@code arrays} argument is {@code null} or contains only {@code null}
* Â elements, then this method returns {@code null}.</li>