sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1467276 - in /sis/branches/JDK7: sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/ sis-metadata/src/main/java/org/apache/sis/metadata/ sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/ sis-metadata/src/main/java/o...
Date Fri, 12 Apr 2013 14:21:21 GMT
Author: desruisseaux
Date: Fri Apr 12 14:21:19 2013
New Revision: 1467276

URL: http://svn.apache.org/r1467276
Log:
Renamed the public CollectionsExt class to Containers.
The intend is to suggest more strongly the relationship with the CheckedContainer interface
(this is possible since we moved the "bad" methods out of public API in the previous commit),
and make room for future addition of methods working on other kind of objects. Iterable may
be first on the list, but other CheckedContainer implementations too.
As a side effect, this allow us to get ride of the ugly "Ext" suffix.

Added:
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/Containers.java
      - copied, changed from r1467267, sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/CollectionsExt.java
Removed:
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/CollectionsExt.java
Modified:
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/LE_ProcessStep.java
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_CoverageDescription.java
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georectified.java
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georeferenceable.java
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_ImageDescription.java
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Metadata.java
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/Cloner.java
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/UnmodifiableArrayList.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/FormattedCharacterIterator.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Classes.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Locales.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/ObjectConverters.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Static.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/package-info.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultInternationalString.java
    sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/LE_ProcessStep.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/LE_ProcessStep.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/LE_ProcessStep.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/LE_ProcessStep.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -21,7 +21,7 @@ import javax.xml.bind.annotation.XmlRoot
 import org.opengis.metadata.lineage.ProcessStep;
 import org.apache.sis.metadata.iso.lineage.DefaultProcessStep;
 
-import static org.apache.sis.util.collection.CollectionsExt.isNullOrEmpty;
+import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
 
 /**

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_CoverageDescription.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_CoverageDescription.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_CoverageDescription.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_CoverageDescription.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -21,7 +21,7 @@ import javax.xml.bind.annotation.XmlRoot
 import org.opengis.metadata.content.CoverageDescription;
 import org.apache.sis.metadata.iso.content.DefaultCoverageDescription;
 
-import static org.apache.sis.util.collection.CollectionsExt.isNullOrEmpty;
+import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
 
 /**

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georectified.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georectified.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georectified.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georectified.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -21,7 +21,7 @@ import javax.xml.bind.annotation.XmlRoot
 import org.opengis.metadata.spatial.Georectified;
 import org.apache.sis.metadata.iso.spatial.DefaultGeorectified;
 
-import static org.apache.sis.util.collection.CollectionsExt.isNullOrEmpty;
+import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
 
 /**

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georeferenceable.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georeferenceable.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georeferenceable.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georeferenceable.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -21,7 +21,7 @@ import javax.xml.bind.annotation.XmlRoot
 import org.opengis.metadata.spatial.Georeferenceable;
 import org.apache.sis.metadata.iso.spatial.DefaultGeoreferenceable;
 
-import static org.apache.sis.util.collection.CollectionsExt.isNullOrEmpty;
+import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
 
 /**

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_ImageDescription.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_ImageDescription.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_ImageDescription.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_ImageDescription.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -21,7 +21,7 @@ import javax.xml.bind.annotation.XmlRoot
 import org.opengis.metadata.content.ImageDescription;
 import org.apache.sis.metadata.iso.content.DefaultImageDescription;
 
-import static org.apache.sis.util.collection.CollectionsExt.isNullOrEmpty;
+import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
 
 /**

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Metadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Metadata.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Metadata.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Metadata.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -21,7 +21,7 @@ import javax.xml.bind.annotation.XmlRoot
 import org.opengis.metadata.Metadata;
 import org.apache.sis.metadata.iso.DefaultMetadata;
 
-import static org.apache.sis.util.collection.CollectionsExt.isNullOrEmpty;
+import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
 
 /**

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/Cloner.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/Cloner.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/Cloner.java [UTF-8]
(original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/Cloner.java [UTF-8]
Fri Apr 12 14:21:19 2013
@@ -24,8 +24,8 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
-import org.apache.sis.util.collection.CollectionsExt;
 
+import org.apache.sis.util.collection.Containers;
 import static org.apache.sis.internal.util.CollectionsExt.unmodifiableOrCopy;
 
 
@@ -112,7 +112,7 @@ final class Cloner extends org.apache.si
                 } else {
                     // Conservatively assumes a List if we are not sure to have a Set,
                     // since the list is less destructive (no removal of duplicated).
-                    collection = CollectionsExt.unmodifiableList(array);
+                    collection = Containers.unmodifiableList(array);
                 }
             }
             return collection;

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -29,8 +29,8 @@ import org.apache.sis.internal.util.Chec
 import org.apache.sis.internal.util.CheckedArrayList;
 
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
-import static org.apache.sis.util.collection.CollectionsExt.isNullOrEmpty;
-import static org.apache.sis.util.collection.CollectionsExt.hashMapCapacity;
+import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
+import static org.apache.sis.util.collection.Containers.hashMapCapacity;
 import static org.apache.sis.internal.jaxb.MarshalContext.isMarshalling;
 
 

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -49,7 +49,7 @@ import org.apache.sis.xml.IdentifiedObje
 import static org.apache.sis.metadata.PropertyComparator.*;
 import static org.apache.sis.internal.util.Utilities.floatEpsilonEqual;
 import static org.apache.sis.internal.util.CollectionsExt.modifiableCopy;
-import static org.apache.sis.util.collection.CollectionsExt.hashMapCapacity;
+import static org.apache.sis.util.collection.Containers.hashMapCapacity;
 
 
 /**

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -34,7 +34,7 @@ import org.apache.sis.internal.jaxb.NonM
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.xml.IdentifierSpace;
 
-import static org.apache.sis.util.collection.CollectionsExt.isNullOrEmpty;
+import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 import static org.apache.sis.internal.metadata.MetadataUtilities.toDate;
 import static org.apache.sis.internal.metadata.MetadataUtilities.toMilliseconds;
 

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -28,7 +28,7 @@ import org.apache.sis.internal.metadata.
 import org.apache.sis.util.collection.CheckedContainer;
 
 import static org.apache.sis.internal.jaxb.MarshalContext.isMarshalling;
-import static org.apache.sis.util.collection.CollectionsExt.isNullOrEmpty;
+import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
 
 /**

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -31,7 +31,7 @@ import org.apache.sis.util.ArgumentCheck
 import org.apache.sis.xml.IdentifierMap;
 import org.apache.sis.xml.IdentifierSpace;
 
-import static org.apache.sis.util.collection.CollectionsExt.hashMapCapacity;
+import static org.apache.sis.util.collection.Containers.hashMapCapacity;
 
 // Related to JDK7
 import java.util.Objects;

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/UnmodifiableArrayList.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/UnmodifiableArrayList.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/UnmodifiableArrayList.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/UnmodifiableArrayList.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -98,7 +98,7 @@ public class UnmodifiableArrayList<E> ex
      * {@section WARNING! Type safety hole}
      * Callers <strong>must</strong> ensure that the type of array elements in
exactly {@code E},
      * not a subtype of {@code E}. If the caller is okay with {@code List<? extends E>},
then (s)he
-     * should use {@link org.apache.sis.util.collection.CollectionsExt#unmodifiableList(E[])}
instead.
+     * should use {@link org.apache.sis.util.collection.Containers#unmodifiableList(E[])}
instead.
      * See class javadoc for more information.
      *
      * @param  <E> The type of elements in the list.
@@ -120,7 +120,7 @@ public class UnmodifiableArrayList<E> ex
      * {@section WARNING! Type safety hole}
      * Callers <strong>must</strong> ensure that the type of array elements in
exactly {@code E},
      * not a subtype of {@code E}. If the caller is okay with {@code List<? extends E>},
then (s)he
-     * should use {@link org.apache.sis.util.collection.CollectionsExt#unmodifiableList(E[])}
instead.
+     * should use {@link org.apache.sis.util.collection.Containers#unmodifiableList(E[])}
instead.
      * See class javadoc for more information.
      *
      * @param  <E>   The type of elements in the list.

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/FormattedCharacterIterator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/FormattedCharacterIterator.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/FormattedCharacterIterator.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/FormattedCharacterIterator.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -26,7 +26,7 @@ import java.util.Set;
 import java.text.Format;
 import java.text.AttributedCharacterIterator;
 import org.apache.sis.util.ArgumentChecks;
-import org.apache.sis.util.collection.CollectionsExt;
+import org.apache.sis.util.collection.Containers;
 import org.apache.sis.internal.converter.SurjectiveConverter;
 import org.apache.sis.internal.simple.SimpleCharacterIterator;
 
@@ -396,7 +396,7 @@ final class FormattedCharacterIterator e
     @Override
     public Map<Attribute, Object> getAttributes() {
         final int index = getIndex();
-        return CollectionsExt.derivedMap(attributes, new Filter(attributes, index), new Selector(index));
+        return Containers.derivedMap(attributes, new Filter(attributes, index), new Selector(index));
     }
 
     /**

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Classes.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Classes.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Classes.java [UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Classes.java [UTF-8] Fri
Apr 12 14:21:19 2013
@@ -29,7 +29,7 @@ import java.lang.reflect.WildcardType;
 import java.lang.reflect.GenericArrayType;
 import java.lang.reflect.ParameterizedType;
 
-import static org.apache.sis.util.collection.CollectionsExt.hashMapCapacity;
+import static org.apache.sis.util.collection.Containers.hashMapCapacity;
 
 
 /**

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Locales.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Locales.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Locales.java [UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Locales.java [UTF-8] Fri
Apr 12 14:21:19 2013
@@ -29,7 +29,7 @@ import org.apache.sis.util.logging.Loggi
 import org.apache.sis.util.resources.Errors;
 
 import static org.apache.sis.util.CharSequences.trimWhitespaces;
-import static org.apache.sis.util.collection.CollectionsExt.hashMapCapacity;
+import static org.apache.sis.util.collection.Containers.hashMapCapacity;
 
 
 /**

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/ObjectConverters.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/ObjectConverters.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/ObjectConverters.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/ObjectConverters.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -18,7 +18,7 @@ package org.apache.sis.util;
 
 import java.util.Map;
 import java.util.Set;
-import org.apache.sis.util.collection.CollectionsExt;
+import org.apache.sis.util.collection.Containers;
 import org.apache.sis.internal.converter.IdentityConverter;
 import org.apache.sis.internal.converter.SystemRegistry;
 
@@ -103,7 +103,7 @@ public final class ObjectConverters exte
      * by invoking the {@link ObjectConverter#convert(Object)} method on the given converter.
      *
      * <p>This convenience method delegates to
-     * {@link CollectionsExt#derivedSet CollectionsExt.derivedSet(…)}.
+     * {@link Containers#derivedSet Containers.derivedSet(…)}.
      * See the javadoc of the above method for more information.
      *
      * @param  <S>       The type of elements in the storage (original) set.
@@ -114,10 +114,10 @@ public final class ObjectConverters exte
      * @return A view over the {@code storage} set containing all elements converted by the
given
      *         converter, or {@code null} if {@code storage} was null.
      *
-     * @see CollectionsExt#derivedSet(Set, ObjectConverter)
+     * @see Containers#derivedSet(Set, ObjectConverter)
      */
     public static <S,E> Set<E> derivedSet(final Set<S> storage, final ObjectConverter<S,E>
converter) {
-        return CollectionsExt.derivedSet(storage, converter);
+        return Containers.derivedSet(storage, converter);
     }
 
     /**
@@ -126,7 +126,7 @@ public final class ObjectConverters exte
      * by invoking the {@link ObjectConverter#convert(Object)} method on the given converters.
      *
      * <p>This convenience method delegates to
-     * {@link CollectionsExt#derivedMap CollectionsExt.derivedMap(…)}.
+     * {@link Containers#derivedMap Containers.derivedMap(…)}.
      * See the javadoc of the above method for more information.
      *
      * @param <SK>         The type of keys   in the storage map.
@@ -139,13 +139,13 @@ public final class ObjectConverters exte
      * @return A view over the {@code storage} map containing all entries converted by the
given
      *         converters, or {@code null} if {@code storage} was null.
      *
-     * @see CollectionsExt#derivedMap(Map, ObjectConverter, ObjectConverter)
+     * @see Containers#derivedMap(Map, ObjectConverter, ObjectConverter)
      */
     public static <SK,SV,K,V> Map<K,V> derivedMap(final Map<SK,SV> storage,
                                                   final ObjectConverter<SK,K> keyConverter,
                                                   final ObjectConverter<SV,V> valueConverter)
     {
-        return CollectionsExt.derivedMap(storage, keyConverter, valueConverter);
+        return Containers.derivedMap(storage, keyConverter, valueConverter);
     }
 
     /**
@@ -154,7 +154,7 @@ public final class ObjectConverters exte
      * invoking the {@link ObjectConverter#convert(Object)} method on the given converter.
      *
      * <p>This convenience method delegates to
-     * {@link CollectionsExt#derivedMap CollectionsExt.derivedMap(…)}.
+     * {@link Containers#derivedMap Containers.derivedMap(…)}.
      * See the javadoc of the above method for more information.
      *
      * @param <SK>         The type of keys   in the storage map.
@@ -166,14 +166,14 @@ public final class ObjectConverters exte
      * @return A view over the {@code storage} map containing all entries with the keys converted
      *         by the given converter, or {@code null} if {@code storage} was null.
      *
-     * @see CollectionsExt#derivedMap(Map, ObjectConverter, ObjectConverter)
+     * @see Containers#derivedMap(Map, ObjectConverter, ObjectConverter)
      */
     public static <SK,K,V> Map<K,V> derivedKeys(final Map<SK,V> storage,
                                                 final ObjectConverter<SK,K> keyConverter,
                                                 final Class<V> valueType)
     {
         ArgumentChecks.ensureNonNull("valueType", valueType);
-        return CollectionsExt.derivedMap(storage, keyConverter, identity(valueType));
+        return Containers.derivedMap(storage, keyConverter, identity(valueType));
     }
 
     /**
@@ -182,7 +182,7 @@ public final class ObjectConverters exte
      * invoking the {@link ObjectConverter#convert(Object)} method on the given converter.
      *
      * <p>This convenience method delegates to
-     * {@link CollectionsExt#derivedMap CollectionsExt.derivedMap(…)}.
+     * {@link Containers#derivedMap Containers.derivedMap(…)}.
      * See the javadoc of the above method for more information.
      *
      * @param <K>          The type of keys in the storage and derived map.
@@ -194,13 +194,13 @@ public final class ObjectConverters exte
      * @return A view over the {@code storage} map containing all entries with the values
converted
      *         by the given converter, or {@code null} if {@code storage} was null.
      *
-     * @see CollectionsExt#derivedMap(Map, ObjectConverter, ObjectConverter)
+     * @see Containers#derivedMap(Map, ObjectConverter, ObjectConverter)
      */
     public static <K,SV,V> Map<K,V> derivedValues(final Map<K,SV> storage,
                                                   final Class<K> keyType,
                                                   final ObjectConverter<SV,V> valueConverter)
     {
         ArgumentChecks.ensureNonNull("keyType", keyType);
-        return CollectionsExt.derivedMap(storage, identity(keyType), valueConverter);
+        return Containers.derivedMap(storage, identity(keyType), valueConverter);
     }
 }

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Static.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Static.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Static.java [UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Static.java [UTF-8] Fri
Apr 12 14:21:19 2013
@@ -42,8 +42,9 @@ package org.apache.sis.util;
  *         and test if a unit is angular, linear or temporal.</td></tr>
  *
  * <tr><th colspan="2" class="hsep">Structures (trees, collections, arrays, parameters)</th></tr>
- * <tr><td>{@link org.apache.sis.util.collection.CollectionsExt}</td>
- *     <td>Additions to the JDK {@link java.util.Collections} methods.</td></tr>
+ * <tr><td>{@link org.apache.sis.util.collection.Containers}</td>
+ *     <td>Additions to the JDK {@link java.util.Collections} methods, also related
to the
+ *         {@link org.apache.sis.util.collection.CheckedContainer} interface.</td></tr>
  * <tr><td>{@link ArraysExt}</td>
  *     <td>Insert or remove elements in the middle of arrays.</td></tr>
  *

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -214,7 +214,7 @@ public class Cache<K,V> extends Abstract
     public Cache(int initialCapacity, final long costLimit, final boolean soft) {
         ArgumentChecks.ensureStrictlyPositive("initialCapacity", initialCapacity);
         ArgumentChecks.ensurePositive("costLimit", costLimit);
-        initialCapacity = CollectionsExt.hashMapCapacity(initialCapacity);
+        initialCapacity = Containers.hashMapCapacity(initialCapacity);
         this.map        = new ConcurrentHashMap<>(initialCapacity);
         this.costs      = new LinkedHashMap<>((int) Math.min(initialCapacity, costLimit),
0.75f, true);
         this.costLimit  = costLimit;

Copied: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/Containers.java
(from r1467267, sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/CollectionsExt.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/Containers.java?p2=sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/Containers.java&p1=sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/CollectionsExt.java&r1=1467267&r2=1467276&rev=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/CollectionsExt.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/Containers.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -27,19 +27,20 @@ import org.apache.sis.internal.util.Unmo
 
 
 /**
- * Static methods working on {@link Collection} objects.
- * This is an extension to the standard {@link Collections} utility class.
+ * Static methods working on {@link Collection} or {@link CheckedContainer} objects.
+ * Unless otherwise noted in the javadoc, every collections except {@link Map} returned
+ * by the methods in this class implement the {@code CheckedContainer} interface.
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.3 (derived from geotk-3.00)
  * @version 0.3
  * @module
  */
-public final class CollectionsExt extends Static {
+public final class Containers extends Static {
     /**
      * Do not allow instantiation of this class.
      */
-    private CollectionsExt() {
+    private Containers() {
     }
 
     /**
@@ -89,6 +90,8 @@ public final class CollectionsExt extend
      * @param  array The array to wrap, or {@code null} if none.
      * @return The given array wrapped in an unmodifiable list, or {@code null} if the given
      *         array was null.
+     *
+     * @see java.util.Arrays#asList(T[])
      */
     @SafeVarargs
     public static <E> List<? extends E> unmodifiableList(final E... array) {

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -29,8 +29,8 @@ import org.apache.sis.internal.util.Clon
 import org.apache.sis.internal.util.UnmodifiableArrayList;
 
 import static org.apache.sis.util.CharSequences.trimWhitespaces;
-import static org.apache.sis.util.collection.CollectionsExt.isNullOrEmpty;
-import static org.apache.sis.util.collection.CollectionsExt.hashMapCapacity;
+import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
+import static org.apache.sis.util.collection.Containers.hashMapCapacity;
 
 // Related to JDK7
 import java.util.Objects;

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/package-info.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/package-info.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -34,8 +34,8 @@
  *     and supports concurrency, while the other implementations are more lightweight, sometime
  *     thread-safe but without concurrency support.
  *   </li><li>
- *     {@linkplain org.apache.sis.util.collection.CollectionsExt#derivedMap Derived Map}
and
- *     {@linkplain org.apache.sis.util.collection.CollectionsExt#derivedSet derived Set}
are wrapper collections
+ *     {@linkplain org.apache.sis.util.collection.Containers#derivedMap Derived Map} and
+ *     {@linkplain org.apache.sis.util.collection.Containers#derivedSet derived Set} are
wrapper collections
  *     in which the keys or the values are derived on-the-fly from the content of an other
collection.
  *     The can also be used for creating filtered views.
  *   </li><li>

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultInternationalString.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultInternationalString.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultInternationalString.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultInternationalString.java
[UTF-8] Fri Apr 12 14:21:19 2013
@@ -32,7 +32,7 @@ import org.apache.sis.util.Locales;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.resources.Errors;
 
-import static org.apache.sis.util.collection.CollectionsExt.isNullOrEmpty;
+import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
 // Related to JDK7
 import java.util.Objects;

Modified: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java?rev=1467276&r1=1467275&r2=1467276&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java [UTF-8]
(original)
+++ sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java [UTF-8]
Fri Apr 12 14:21:19 2013
@@ -39,8 +39,8 @@ import org.junit.runners.model.TestClass
 
 import org.apache.sis.util.ArraysExt;
 
-import static org.apache.sis.util.collection.CollectionsExt.isNullOrEmpty;
-import static org.apache.sis.util.collection.CollectionsExt.hashMapCapacity;
+import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
+import static org.apache.sis.util.collection.Containers.hashMapCapacity;
 
 
 /**



Mime
View raw message