Rename CompliantBag to CollectionBag.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1500007 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
eebbd0f73c
commit
719d0c5603
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.apache.commons.collections4;
|
||||
|
||||
import org.apache.commons.collections4.bag.CompliantBag;
|
||||
import org.apache.commons.collections4.bag.CollectionBag;
|
||||
import org.apache.commons.collections4.bag.HashBag;
|
||||
import org.apache.commons.collections4.bag.PredicatedBag;
|
||||
import org.apache.commons.collections4.bag.PredicatedSortedBag;
|
||||
|
@ -144,8 +144,8 @@ public class BagUtils {
|
|||
* @throws IllegalArgumentException if bag is null
|
||||
* @since 4.0
|
||||
*/
|
||||
public static <E> Bag<E> compliantBag(final Bag<E> bag) {
|
||||
return CompliantBag.compliantBag(bag);
|
||||
public static <E> Bag<E> collectionBag(final Bag<E> bag) {
|
||||
return CollectionBag.collectionBag(bag);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.apache.commons.collections4.Bag;
|
|||
* @since 4.0
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class CompliantBag<E>
|
||||
public final class CollectionBag<E>
|
||||
extends AbstractBagDecorator<E> implements Serializable {
|
||||
|
||||
/** Serialization version */
|
||||
|
@ -45,8 +45,8 @@ public final class CompliantBag<E>
|
|||
* @return a Bag that complies to the Collection contract
|
||||
* @throws IllegalArgumentException if bag is null
|
||||
*/
|
||||
public static <E> Bag<E> compliantBag(final Bag<E> bag) {
|
||||
return new CompliantBag<E>(bag);
|
||||
public static <E> Bag<E> collectionBag(final Bag<E> bag) {
|
||||
return new CollectionBag<E>(bag);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
@ -56,7 +56,7 @@ public final class CompliantBag<E>
|
|||
* @param bag the bag to decorate, must not be null
|
||||
* @throws IllegalArgumentException if bag is null
|
||||
*/
|
||||
public CompliantBag(final Bag<E> bag) {
|
||||
public CollectionBag(final Bag<E> bag) {
|
||||
super(bag);
|
||||
}
|
||||
|
|
@ -31,19 +31,19 @@ import org.apache.commons.collections4.bag.HashBag;
|
|||
import org.apache.commons.collections4.collection.AbstractCollectionTest;
|
||||
|
||||
/**
|
||||
* Test class for {@link CompliantBag}.
|
||||
* Test class for {@link CollectionBag}.
|
||||
*
|
||||
* @version $Id$
|
||||
* @since 4.0
|
||||
*/
|
||||
public class CompliantBagTest<T> extends AbstractCollectionTest<T> {
|
||||
public class CollectionBagTest<T> extends AbstractCollectionTest<T> {
|
||||
|
||||
/**
|
||||
* JUnit constructor.
|
||||
*
|
||||
* @param testName the test class name
|
||||
*/
|
||||
public CompliantBagTest(final String testName) {
|
||||
public CollectionBagTest(final String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ public class CompliantBagTest<T> extends AbstractCollectionTest<T> {
|
|||
|
||||
@Override
|
||||
public Bag<T> makeObject() {
|
||||
return CompliantBag.compliantBag(new HashBag<T>());
|
||||
return CollectionBag.collectionBag(new HashBag<T>());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -83,14 +83,14 @@ public class CompliantBagTest<T> extends AbstractCollectionTest<T> {
|
|||
|
||||
// public void testCreate() throws Exception {
|
||||
// Bag bag = makeObject();
|
||||
// writeExternalFormToDisk((java.io.Serializable) bag, "src/test/resources/data/test/CompliantBag.emptyCollection.version4.obj");
|
||||
// writeExternalFormToDisk((java.io.Serializable) bag, "src/test/resources/data/test/CollectionBag.emptyCollection.version4.obj");
|
||||
// bag = makeObject();
|
||||
// bag.add("A");
|
||||
// bag.add("A");
|
||||
// bag.add("B");
|
||||
// bag.add("B");
|
||||
// bag.add("C");
|
||||
// writeExternalFormToDisk((java.io.Serializable) bag, "src/test/resources/data/test/CompliantBag.fullCollection.version4.obj");
|
||||
// writeExternalFormToDisk((java.io.Serializable) bag, "src/test/resources/data/test/CollectionBag.fullCollection.version4.obj");
|
||||
// }
|
||||
|
||||
//-----------------------------------------------------------------------
|
Loading…
Reference in New Issue