commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1148801 [5/5] - in /commons/proper/collections/trunk/src: java/org/apache/commons/collections/ java/org/apache/commons/collections/bag/ java/org/apache/commons/collections/bidimap/ java/org/apache/commons/collections/buffer/ java/org/apach...
Date Wed, 20 Jul 2011 14:45:30 GMT
Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestPredicatedSortedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestPredicatedSortedMap.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestPredicatedSortedMap.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestPredicatedSortedMap.java
Wed Jul 20 14:44:46 2011
@@ -52,7 +52,7 @@ public class TestPredicatedSortedMap<K, 
     //-----------------------------------------------------------------------
     protected SortedMap<K, V> decorateMap(SortedMap<K, V> map, Predicate<?
super K> keyPredicate,
         Predicate<? super V> valuePredicate) {
-        return PredicatedSortedMap.decorate(map, keyPredicate, valuePredicate);
+        return PredicatedSortedMap.predicatedSortedMap(map, keyPredicate, valuePredicate);
     }
 
     @Override

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestSingletonMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestSingletonMap.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestSingletonMap.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestSingletonMap.java
Wed Jul 20 14:44:46 2011
@@ -50,7 +50,7 @@ public class TestSingletonMap<K, V> exte
     public OrderedMap<K, V> makeObject() {
         // need an empty singleton map, but thats not possible
         // use a ridiculous fake instead to make the tests pass
-        return UnmodifiableOrderedMap.decorate(ListOrderedMap.decorate(new HashMap<K,
V>()));
+        return UnmodifiableOrderedMap.unmodifiableOrderedMap(ListOrderedMap.listOrderedMap(new
HashMap<K, V>()));
     }
 
     @Override

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestTransformedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestTransformedMap.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestTransformedMap.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestTransformedMap.java
Wed Jul 20 14:44:46 2011
@@ -43,7 +43,7 @@ public class TestTransformedMap<K, V> ex
     //-----------------------------------------------------------------------
     @Override
     public IterableMap<K, V> makeObject() {
-        return TransformedMap.decorate(new HashMap<K, V>(), TransformerUtils.<K>
nopTransformer(),
+        return TransformedMap.transformingMap(new HashMap<K, V>(), TransformerUtils.<K>
nopTransformer(),
                 TransformerUtils.<V> nopTransformer());
     }
 
@@ -53,7 +53,7 @@ public class TestTransformedMap<K, V> ex
         Object[] els = new Object[] { "1", "3", "5", "7", "2", "4", "6" };
 
         Map<K, V> map = TransformedMap
-                .decorate(
+                .transformingMap(
                         new HashMap<K, V>(),
                         (Transformer<? super K, ? extends K>) TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER,
                         null);
@@ -70,7 +70,7 @@ public class TestTransformedMap<K, V> ex
         assertEquals(null, map.remove(els[0]));
         assertEquals(els[0], map.remove(new Integer((String) els[0])));
 
-        map = TransformedMap.decorate(new HashMap(), null, TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER);
+        map = TransformedMap.transformingMap(new HashMap(), null, TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(0, map.size());
         for (int i = 0; i < els.length; i++) {
             map.put((K) els[i], (V) els[i]);
@@ -104,7 +104,7 @@ public class TestTransformedMap<K, V> ex
         base.put((K) "C", (V) "3");
 
         Map<K, V> trans = TransformedMap
-                .decorate(
+                .transformingMap(
                         base,
                         null,
                         (Transformer<? super V, ? extends V>) TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER);
@@ -124,7 +124,7 @@ public class TestTransformedMap<K, V> ex
         base.put((K) "C", (V) "3");
 
         Map<K, V> trans = TransformedMap
-                .decorateTransform(
+                .transformedMap(
                         base,
                         null,
                         (Transformer<? super V, ? extends V>) TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER);

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestTransformedSortedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestTransformedSortedMap.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestTransformedSortedMap.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestTransformedSortedMap.java
Wed Jul 20 14:44:46 2011
@@ -51,7 +51,7 @@ public class TestTransformedSortedMap<K,
     @Override
     @SuppressWarnings("unchecked")
     public SortedMap<K, V> makeObject() {
-        return TransformedSortedMap.decorate(new TreeMap<K, V>(),
+        return TransformedSortedMap.transformingSortedMap(new TreeMap<K, V>(),
                 (Transformer<? super K, ? extends K>) TransformerUtils.nopTransformer(),
                 (Transformer<? super V, ? extends V>) TransformerUtils.nopTransformer());
     }
@@ -68,7 +68,7 @@ public class TestTransformedSortedMap<K,
         Object[] els = new Object[] { "1", "3", "5", "7", "2", "4", "6" };
 
         SortedMap<K, V> map = TransformedSortedMap
-                .decorate(
+                .transformingSortedMap(
                         new TreeMap<K, V>(),
                         (Transformer<? super K, ? extends K>) TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER,
                         null);
@@ -92,7 +92,7 @@ public class TestTransformedSortedMap<K,
         assertEquals(els[0], map.remove(new Integer((String) els[0])));
 
         map = TransformedSortedMap
-                .decorate(
+                .transformingSortedMap(
                         new TreeMap<K, V>(),
                         null,
                         (Transformer<? super V, ? extends V>) TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER);
@@ -129,7 +129,7 @@ public class TestTransformedSortedMap<K,
         base.put((K) "C", (V) "3");
 
         SortedMap<K, V> trans = TransformedSortedMap
-                .decorate(
+                .transformingSortedMap(
                         base,
                         null,
                         (Transformer<? super V, ? extends V>) TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER);
@@ -149,7 +149,7 @@ public class TestTransformedSortedMap<K,
         base.put((K) "C", (V) "3");
 
         SortedMap<K, V> trans = TransformedSortedMap
-                .decorateTransform(
+                .transformedSortedMap(
                         base,
                         null,
                         (Transformer<? super V, ? extends V>) TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER);

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestUnmodifiableMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestUnmodifiableMap.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestUnmodifiableMap.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestUnmodifiableMap.java
Wed Jul 20 14:44:46 2011
@@ -41,7 +41,7 @@ public class TestUnmodifiableMap<K, V> e
 
     @Override
     public IterableMap<K, V> makeObject() {
-        return (IterableMap<K, V>) UnmodifiableMap.decorate(new HashMap<K, V>());
+        return (IterableMap<K, V>) UnmodifiableMap.unmodifiableMap(new HashMap<K,
V>());
     }
 
     @Override
@@ -63,7 +63,7 @@ public class TestUnmodifiableMap<K, V> e
     public IterableMap<K, V> makeFullMap() {
         Map<K, V> m = new HashMap<K, V>();
         addSampleMappings(m);
-        return (IterableMap<K, V>) UnmodifiableMap.decorate(m);
+        return (IterableMap<K, V>) UnmodifiableMap.unmodifiableMap(m);
     }
 
     //-----------------------------------------------------------------------
@@ -74,10 +74,10 @@ public class TestUnmodifiableMap<K, V> e
 
     public void testDecorateFactory() {
         Map<K, V> map = makeFullMap();
-        assertSame(map, UnmodifiableMap.decorate(map));
+        assertSame(map, UnmodifiableMap.unmodifiableMap(map));
 
         try {
-            UnmodifiableMap.decorate(null);
+            UnmodifiableMap.unmodifiableMap(null);
             fail();
         } catch (IllegalArgumentException ex) {}
     }

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestUnmodifiableOrderedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestUnmodifiableOrderedMap.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestUnmodifiableOrderedMap.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestUnmodifiableOrderedMap.java
Wed Jul 20 14:44:46 2011
@@ -40,7 +40,7 @@ public class TestUnmodifiableOrderedMap<
 
     @Override
     public OrderedMap<K, V> makeObject() {
-        return UnmodifiableOrderedMap.decorate(ListOrderedMap.decorate(new HashMap<K,
V>()));
+        return UnmodifiableOrderedMap.unmodifiableOrderedMap(ListOrderedMap.listOrderedMap(new
HashMap<K, V>()));
     }
 
     @Override
@@ -60,9 +60,9 @@ public class TestUnmodifiableOrderedMap<
 
     @Override
     public OrderedMap<K, V> makeFullMap() {
-        OrderedMap<K, V> m = ListOrderedMap.decorate(new HashMap<K, V>());
+        OrderedMap<K, V> m = ListOrderedMap.listOrderedMap(new HashMap<K, V>());
         addSampleMappings(m);
-        return UnmodifiableOrderedMap.decorate(m);
+        return UnmodifiableOrderedMap.unmodifiableOrderedMap(m);
     }
 
     //-----------------------------------------------------------------------
@@ -73,10 +73,10 @@ public class TestUnmodifiableOrderedMap<
 
     public void testDecorateFactory() {
         OrderedMap<K, V> map = makeFullMap();
-        assertSame(map, UnmodifiableOrderedMap.decorate(map));
+        assertSame(map, UnmodifiableOrderedMap.unmodifiableOrderedMap(map));
 
         try {
-            UnmodifiableOrderedMap.decorate(null);
+            UnmodifiableOrderedMap.unmodifiableOrderedMap(null);
             fail();
         } catch (IllegalArgumentException ex) {}
     }

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestUnmodifiableSortedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestUnmodifiableSortedMap.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestUnmodifiableSortedMap.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestUnmodifiableSortedMap.java
Wed Jul 20 14:44:46 2011
@@ -40,7 +40,7 @@ public class TestUnmodifiableSortedMap<K
 
     @Override
     public SortedMap<K, V> makeObject() {
-        return UnmodifiableSortedMap.decorate(new TreeMap<K, V>());
+        return UnmodifiableSortedMap.unmodifiableSortedMap(new TreeMap<K, V>());
     }
 
     @Override
@@ -62,7 +62,7 @@ public class TestUnmodifiableSortedMap<K
     public SortedMap<K, V> makeFullMap() {
         SortedMap<K, V> m = new TreeMap<K, V>();
         addSampleMappings(m);
-        return UnmodifiableSortedMap.decorate(m);
+        return UnmodifiableSortedMap.unmodifiableSortedMap(m);
     }
 
     //-----------------------------------------------------------------------
@@ -73,10 +73,10 @@ public class TestUnmodifiableSortedMap<K
 
     public void testDecorateFactory() {
         SortedMap<K, V> map = makeFullMap();
-        assertSame(map, UnmodifiableSortedMap.decorate(map));
+        assertSame(map, UnmodifiableSortedMap.unmodifiableSortedMap(map));
 
         try {
-            UnmodifiableSortedMap.decorate(null);
+            UnmodifiableSortedMap.unmodifiableSortedMap(null);
             fail();
         } catch (IllegalArgumentException ex) {}
     }

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestListOrderedSet.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestListOrderedSet.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestListOrderedSet.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestListOrderedSet.java
Wed Jul 20 14:44:46 2011
@@ -45,7 +45,7 @@ public class TestListOrderedSet<E> exten
 
     @Override
     public ListOrderedSet<E> makeObject() {
-        return ListOrderedSet.decorate(new HashSet<E>());
+        return ListOrderedSet.listOrderedSet(new HashSet<E>());
     }
 
     @SuppressWarnings("unchecked")
@@ -198,23 +198,23 @@ public class TestListOrderedSet<E> exten
 
     public void testDecorator() {
         try {
-            ListOrderedSet.decorate((List<E>) null);
+            ListOrderedSet.listOrderedSet((List<E>) null);
             fail();
         } catch (IllegalArgumentException ex) {}
         try {
-            ListOrderedSet.decorate((Set<E>) null);
+            ListOrderedSet.listOrderedSet((Set<E>) null);
             fail();
         } catch (IllegalArgumentException ex) {}
         try {
-            ListOrderedSet.decorate(null, null);
+            ListOrderedSet.listOrderedSet(null, null);
             fail();
         } catch (IllegalArgumentException ex) {}
         try {
-            ListOrderedSet.decorate(new HashSet<E>(), null);
+            ListOrderedSet.listOrderedSet(new HashSet<E>(), null);
             fail();
         } catch (IllegalArgumentException ex) {}
         try {
-            ListOrderedSet.decorate(null, new ArrayList<E>());
+            ListOrderedSet.listOrderedSet(null, new ArrayList<E>());
             fail();
         } catch (IllegalArgumentException ex) {}
     }

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestMapBackedSet.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestMapBackedSet.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestMapBackedSet.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestMapBackedSet.java
Wed Jul 20 14:44:46 2011
@@ -36,7 +36,7 @@ public class TestMapBackedSet<E> extends
 
     @Override
     public Set<E> makeObject() {
-        return MapBackedSet.decorate(new HashedMap<E, Object>());
+        return MapBackedSet.mapBackedSet(new HashedMap<E, Object>());
     }
 
     @Override

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestMapBackedSet2.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestMapBackedSet2.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestMapBackedSet2.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestMapBackedSet2.java
Wed Jul 20 14:44:46 2011
@@ -37,7 +37,7 @@ public class TestMapBackedSet2<E> extend
 
     @Override
     public Set<E> makeObject() {
-        return MapBackedSet.decorate(new LinkedMap<E, Object>());
+        return MapBackedSet.mapBackedSet(new LinkedMap<E, Object>());
     }
 
     @SuppressWarnings("unchecked")

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestPredicatedSet.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestPredicatedSet.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestPredicatedSet.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestPredicatedSet.java
Wed Jul 20 14:44:46 2011
@@ -42,7 +42,7 @@ public class TestPredicatedSet<E> extend
     protected Predicate<E> truePredicate = TruePredicate.<E>truePredicate();
 
     protected PredicatedSet<E> decorateSet(Set<E> set, Predicate<? super E>
predicate) {
-        return (PredicatedSet<E>) PredicatedSet.decorate(set, predicate);
+        return (PredicatedSet<E>) PredicatedSet.predicatedSet(set, predicate);
     }
 
     @Override

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestPredicatedSortedSet.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestPredicatedSortedSet.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestPredicatedSortedSet.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestPredicatedSortedSet.java
Wed Jul 20 14:44:46 2011
@@ -53,14 +53,14 @@ public class TestPredicatedSortedSet<E> 
 
     @Override
     public SortedSet<E> makeObject() {
-        return PredicatedSortedSet.decorate(new TreeSet<E>(), truePredicate);
+        return PredicatedSortedSet.predicatedSortedSet(new TreeSet<E>(), truePredicate);
     }
 
     @Override
     public SortedSet<E> makeFullCollection() {
         TreeSet<E> set = new TreeSet<E>();
         set.addAll(Arrays.asList(getFullElements()));
-        return PredicatedSortedSet.decorate(set, truePredicate);
+        return PredicatedSortedSet.predicatedSortedSet(set, truePredicate);
     }
 
 //--------------------------------------------------------------------
@@ -72,7 +72,7 @@ public class TestPredicatedSortedSet<E> 
         };
 
     protected PredicatedSortedSet<E> makeTestSet() {
-        return (PredicatedSortedSet<E>) PredicatedSortedSet.decorate(new TreeSet<E>(),
testPredicate);
+        return (PredicatedSortedSet<E>) PredicatedSortedSet.predicatedSortedSet(new
TreeSet<E>(), testPredicate);
     }
 
     public void testGetSet() {

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestSynchronizedSet.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestSynchronizedSet.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestSynchronizedSet.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestSynchronizedSet.java
Wed Jul 20 14:44:46 2011
@@ -45,7 +45,7 @@ public class TestSynchronizedSet<E> exte
    //-------------------------------------------------------------------
     @Override
     public Set<E> makeObject() {
-        return SynchronizedSet.decorate(new HashSet<E>());
+        return SynchronizedSet.synchronizedSet(new HashSet<E>());
     }
 
     @Override

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestSynchronizedSortedSet.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestSynchronizedSortedSet.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestSynchronizedSortedSet.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestSynchronizedSortedSet.java
Wed Jul 20 14:44:46 2011
@@ -45,7 +45,7 @@ public class TestSynchronizedSortedSet<E
    //-------------------------------------------------------------------
     @Override
     public SortedSet<E> makeObject() {
-        return SynchronizedSortedSet.decorate(new TreeSet<E>());
+        return SynchronizedSortedSet.synchronizedSortedSet(new TreeSet<E>());
     }
 
     @Override

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestTransformedSet.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestTransformedSet.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestTransformedSet.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestTransformedSet.java
Wed Jul 20 14:44:46 2011
@@ -53,7 +53,7 @@ public class TestTransformedSet<E> exten
     @Override
     @SuppressWarnings("unchecked")
     public Set<E> makeObject() {
-        return TransformedSet.decorate(new HashSet<E>(),
+        return TransformedSet.transformingSet(new HashSet<E>(),
                 (Transformer<E, E>) TestTransformedCollection.NOOP_TRANSFORMER);
     }
 
@@ -62,13 +62,13 @@ public class TestTransformedSet<E> exten
     public Set<E> makeFullCollection() {
         Set<E> list = new HashSet<E>();
         list.addAll(Arrays.asList(getFullElements()));
-        return TransformedSet.decorate(list,
+        return TransformedSet.transformingSet(list,
                 (Transformer<E, E>) TestTransformedCollection.NOOP_TRANSFORMER);
     }
 
     @SuppressWarnings("unchecked")
     public void testTransformedSet() {
-        Set<E> set = TransformedSet.decorate(new HashSet<E>(),
+        Set<E> set = TransformedSet.transformingSet(new HashSet<E>(),
                 (Transformer<E, E>) TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(0, set.size());
         E[] els = (E[]) new Object[] { "1", "3", "5", "7", "2", "4", "6" };
@@ -90,7 +90,7 @@ public class TestTransformedSet<E> exten
         for (int i = 0; i < els.length; i++) {
             originalSet.add(els[i]);
         }
-        Set<?> set = TransformedSet.decorateTransform(originalSet, TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER);
+        Set<?> set = TransformedSet.transformedSet(originalSet, TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(els.length, set.size());
         for (int i = 0; i < els.length; i++) {
             assertEquals(true, set.contains(new Integer((String) els[i])));

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestTransformedSortedSet.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestTransformedSortedSet.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestTransformedSortedSet.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestTransformedSortedSet.java
Wed Jul 20 14:44:46 2011
@@ -50,7 +50,7 @@ public class TestTransformedSortedSet<E>
     @Override
     @SuppressWarnings("unchecked")
     public SortedSet<E> makeObject() {
-        return TransformedSortedSet.decorate(new TreeSet<E>(), (Transformer<E, E>)
TestTransformedCollection.NOOP_TRANSFORMER);
+        return TransformedSortedSet.transformingSortedSet(new TreeSet<E>(), (Transformer<E,
E>) TestTransformedCollection.NOOP_TRANSFORMER);
     }
 
     @Override
@@ -58,13 +58,13 @@ public class TestTransformedSortedSet<E>
     public SortedSet<E> makeFullCollection() {
         SortedSet<E> set = new TreeSet<E>();
         set.addAll(Arrays.asList(getFullElements()));
-        return TransformedSortedSet.decorate(set, (Transformer<E, E>) TestTransformedCollection.NOOP_TRANSFORMER);
+        return TransformedSortedSet.transformingSortedSet(set, (Transformer<E, E>)
TestTransformedCollection.NOOP_TRANSFORMER);
     }
 
     //-----------------------------------------------------------------------
     @SuppressWarnings("unchecked")
     public void testTransformedSet() {
-        SortedSet<E> set = TransformedSortedSet.decorate(new TreeSet<E>(),
+        SortedSet<E> set = TransformedSortedSet.transformingSortedSet(new TreeSet<E>(),
                 (Transformer<E, E>) TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(0, set.size());
         E[] els = (E[]) new Object[] { "1", "3", "5", "7", "2", "4", "6" };
@@ -83,7 +83,7 @@ public class TestTransformedSortedSet<E>
         for (int i = 0; i < els.length; i++) {
             originalSet.add(els[i]);
         }
-        Set<?> set = TransformedSortedSet.decorateTransform(originalSet, TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER);
+        Set<?> set = TransformedSortedSet.transformedSet(originalSet, TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(els.length, set.size());
         for (int i = 0; i < els.length; i++) {
             assertEquals(true, set.contains(new Integer((String) els[i])));

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestUnmodifiableSet.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestUnmodifiableSet.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestUnmodifiableSet.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestUnmodifiableSet.java
Wed Jul 20 14:44:46 2011
@@ -46,14 +46,14 @@ public class TestUnmodifiableSet<E> exte
     //-------------------------------------------------------------------
     @Override
     public Set<E> makeObject() {
-        return UnmodifiableSet.decorate(new HashSet<E>());
+        return UnmodifiableSet.unmodifiableSet(new HashSet<E>());
     }
 
     @Override
     public Set<E> makeFullCollection() {
         HashSet<E> set = new HashSet<E>();
         set.addAll(Arrays.asList(getFullElements()));
-        return UnmodifiableSet.decorate(set);
+        return UnmodifiableSet.unmodifiableSet(set);
     }
 
     @Override

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestUnmodifiableSortedSet.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestUnmodifiableSortedSet.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestUnmodifiableSortedSet.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/set/TestUnmodifiableSortedSet.java
Wed Jul 20 14:44:46 2011
@@ -51,14 +51,14 @@ public class TestUnmodifiableSortedSet<E
     //-------------------------------------------------------------------
     @Override
     public SortedSet<E> makeObject() {
-        return UnmodifiableSortedSet.decorate(new TreeSet<E>());
+        return UnmodifiableSortedSet.unmodifiableSortedSet(new TreeSet<E>());
     }
 
     @Override
     public UnmodifiableSortedSet<E> makeFullCollection() {
         TreeSet<E> set = new TreeSet<E>();
         set.addAll(Arrays.asList(getFullElements()));
-        return (UnmodifiableSortedSet<E>) UnmodifiableSortedSet.decorate(set);
+        return (UnmodifiableSortedSet<E>) UnmodifiableSortedSet.unmodifiableSortedSet(set);
     }
 
     @Override

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/splitmap/TestSplitMapUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/splitmap/TestSplitMapUtils.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/splitmap/TestSplitMapUtils.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/splitmap/TestSplitMapUtils.java
Wed Jul 20 14:44:46 2011
@@ -57,7 +57,7 @@ public class TestSplitMapUtils extends B
     protected void setUp() throws Exception {
         super.setUp();
         backingMap = new HashMap<String, Integer>();
-        transformedMap = TransformedMap.decorate(backingMap, NOPTransformer.<String>
getInstance(),
+        transformedMap = TransformedMap.transformingMap(backingMap, NOPTransformer.<String>
nopTransformer(),
                 stringToInt);
         for (int i = 0; i < 10; i++) {
             transformedMap.put(String.valueOf(i), String.valueOf(i));

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/splitmap/TestTransformedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/splitmap/TestTransformedMap.java?rev=1148801&r1=1148800&r2=1148801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/splitmap/TestTransformedMap.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/splitmap/TestTransformedMap.java
Wed Jul 20 14:44:46 2011
@@ -62,7 +62,7 @@ public class TestTransformedMap extends 
 
     // -----------------------------------------------------------------------
     public void testTransformedMap() {
-        TransformedMap<Integer, String, Object, Class<?>> map = TransformedMap.decorate(
+        TransformedMap<Integer, String, Object, Class<?>> map = TransformedMap.transformingMap(
                 new HashMap<String, Class<?>>(), intToString, objectToClass);
 
         Integer[] k = new Integer[] { 0, 1, 2, 3, 4, 5, 6 };
@@ -86,8 +86,8 @@ public class TestTransformedMap extends 
         assertEquals(objectToClass.transform(v[0]), map.remove(intToString.transform(k[0])));
         assertEquals(--sz, map.size());
 
-        TransformedMap<String, String, String, Integer> map2 = TransformedMap.decorate(
-                new HashMap<String, Integer>(), NOPTransformer.<String> getInstance(),
stringToInt);
+        TransformedMap<String, String, String, Integer> map2 = TransformedMap.transformingMap(
+                new HashMap<String, Integer>(), NOPTransformer.<String> nopTransformer(),
stringToInt);
         assertEquals(0, map2.size());
         for (int i = 0; i < 6; i++) {
             map2.put(String.valueOf(i), String.valueOf(i));
@@ -106,8 +106,8 @@ public class TestTransformedMap extends 
     // -----------------------------------------------------------------------
 
     public void testMapIterator() {
-        TransformedMap<String, String, String, Integer> map = TransformedMap.decorate(
-                new HashMap<String, Integer>(), NOPTransformer.<String> getInstance(),
stringToInt);
+        TransformedMap<String, String, String, Integer> map = TransformedMap.transformingMap(
+                new HashMap<String, Integer>(), NOPTransformer.<String> nopTransformer(),
stringToInt);
         assertEquals(0, map.size());
         for (int i = 0; i < 6; i++) {
             map.put(String.valueOf(i), String.valueOf(i));
@@ -121,10 +121,10 @@ public class TestTransformedMap extends 
     }
 
     public void testEmptyMap() throws IOException, ClassNotFoundException {
-        TransformedMap<String, String, String, String> map = TransformedMap.decorate(
+        TransformedMap<String, String, String, String> map = TransformedMap.transformingMap(
                 new HashMap<String, String>(),
-                NOPTransformer.<String>getInstance(),
-                NOPTransformer.<String>getInstance() );
+                NOPTransformer.<String>nopTransformer(),
+                NOPTransformer.<String>nopTransformer() );
 
         ObjectInputStream in = new ObjectInputStream( new FileInputStream( "data/test/TransformedMap.emptyCollection.version3.2.obj"
) );
         Object readObject = in.readObject();
@@ -136,10 +136,10 @@ public class TestTransformedMap extends 
     }
 
     public void testFullMap() throws IOException, ClassNotFoundException {
-        TransformedMap<String, String, String, String> map = TransformedMap.decorate(
+        TransformedMap<String, String, String, String> map = TransformedMap.transformingMap(
                 new HashMap<String, String>(),
-                NOPTransformer.<String>getInstance(),
-                NOPTransformer.<String>getInstance() );
+                NOPTransformer.<String>nopTransformer(),
+                NOPTransformer.<String>nopTransformer() );
         map.put( "a", "b" );
         map.put( "c", "d" );
         map.put( "e", "f" );



Mime
View raw message