Java 类org.apache.commons.collections4.SortedBag 实例源码

项目:sosiefier    文件:PredicatedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
public void testSortOrder() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testSortOrder");
    final SortedBag<T> bag = decorateBag(new org.apache.commons.collections4.bag.TreeBag<T>(), stringPredicate());
    final String one = "one";
    final String two = "two";
    final String three = "three";
    bag.add(((T)(one)));
    bag.add(((T)(two)));
    bag.add(((T)(three)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5820,bag,5819,bag.first());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5821,one);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5823,bag,5822,bag.last());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5824,two);
    final Comparator<? super T> c = bag.comparator();
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5825,(c == null));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:PredicatedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
@org.junit.Test(timeout = 1000)
public void testSortOrder_add1785() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testSortOrder_add1785");
    final SortedBag<T> bag = decorateBag(new org.apache.commons.collections4.bag.TreeBag<T>(), stringPredicate());
    final String one = "one";
    final String two = "two";
    final String three = "three";
    bag.add(((T)(one)));
    bag.add(((T)(one)));
    bag.add(((T)(two)));
    bag.add(((T)(three)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5820,bag,5819,bag.first());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5821,one);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5823,bag,5822,bag.last());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5824,two);
    final Comparator<? super T> c = bag.comparator();
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5825,(c == null));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:PredicatedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
@org.junit.Test(timeout = 1000)
public void testSortOrder_add1786() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testSortOrder_add1786");
    final SortedBag<T> bag = decorateBag(new org.apache.commons.collections4.bag.TreeBag<T>(), stringPredicate());
    final String one = "one";
    final String two = "two";
    final String three = "three";
    bag.add(((T)(one)));
    bag.add(((T)(two)));
    bag.add(((T)(two)));
    bag.add(((T)(three)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5820,bag,5819,bag.first());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5821,one);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5823,bag,5822,bag.last());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5824,two);
    final Comparator<? super T> c = bag.comparator();
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5825,(c == null));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:PredicatedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
@org.junit.Test(timeout = 1000)
public void testSortOrder_add1787() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testSortOrder_add1787");
    final SortedBag<T> bag = decorateBag(new org.apache.commons.collections4.bag.TreeBag<T>(), stringPredicate());
    final String one = "one";
    final String two = "two";
    final String three = "three";
    bag.add(((T)(one)));
    bag.add(((T)(two)));
    bag.add(((T)(three)));
    bag.add(((T)(three)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5820,bag,5819,bag.first());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5821,one);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5823,bag,5822,bag.last());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5824,two);
    final Comparator<? super T> c = bag.comparator();
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5825,(c == null));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:PredicatedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
public void testSortOrder_literalMutation1610() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testSortOrder_literalMutation1610");
    final SortedBag<T> bag = decorateBag(new org.apache.commons.collections4.bag.TreeBag<T>(), stringPredicate());
    final String one = "one";
    final String two = "two";
    final String three = "three";
    bag.add(((T)(one)));
    bag.add(((T)(two)));
    bag.add(((T)(three)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5820,bag,5819,bag.first());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5821,one);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5823,bag,5822,bag.last());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5824,two);
    final Comparator<? super T> c = bag.comparator();
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5825,(c == null));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:PredicatedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
public void testSortOrder_literalMutation1611() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testSortOrder_literalMutation1611");
    final SortedBag<T> bag = decorateBag(new org.apache.commons.collections4.bag.TreeBag<T>(), stringPredicate());
    final String one = "foo";
    final String two = "two";
    final String three = "three";
    bag.add(((T)(one)));
    bag.add(((T)(two)));
    bag.add(((T)(three)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5820,bag,5819,bag.first());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5821,one);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5823,bag,5822,bag.last());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5824,two);
    final Comparator<? super T> c = bag.comparator();
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5825,(c == null));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:PredicatedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
public void testSortOrder_literalMutation1612() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testSortOrder_literalMutation1612");
    final SortedBag<T> bag = decorateBag(new org.apache.commons.collections4.bag.TreeBag<T>(), stringPredicate());
    final String one = "one";
    final String two = "foo";
    final String three = "three";
    bag.add(((T)(one)));
    bag.add(((T)(two)));
    bag.add(((T)(three)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5820,bag,5819,bag.first());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5821,one);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5823,bag,5822,bag.last());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5824,two);
    final Comparator<? super T> c = bag.comparator();
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5825,(c == null));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:PredicatedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
public void testSortOrder_literalMutation1613() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testSortOrder_literalMutation1613");
    final SortedBag<T> bag = decorateBag(new org.apache.commons.collections4.bag.TreeBag<T>(), stringPredicate());
    final String one = "one";
    final String two = "two";
    final String three = "foo";
    bag.add(((T)(one)));
    bag.add(((T)(two)));
    bag.add(((T)(three)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5820,bag,5819,bag.first());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5821,one);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5823,bag,5822,bag.last());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5824,two);
    final Comparator<? super T> c = bag.comparator();
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5825,(c == null));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:PredicatedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
@org.junit.Test(timeout = 1000)
public void testSortOrder_remove1365() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testSortOrder_remove1365");
    final SortedBag<T> bag = decorateBag(new org.apache.commons.collections4.bag.TreeBag<T>(), stringPredicate());
    final String one = "one";
    final String two = "two";
    final String three = "three";
    bag.add(((T)(two)));
    bag.add(((T)(three)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5820,bag,5819,bag.first());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5821,one);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5823,bag,5822,bag.last());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5824,two);
    final Comparator<? super T> c = bag.comparator();
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5825,(c == null));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:PredicatedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
@org.junit.Test(timeout = 1000)
public void testSortOrder_remove1366() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testSortOrder_remove1366");
    final SortedBag<T> bag = decorateBag(new org.apache.commons.collections4.bag.TreeBag<T>(), stringPredicate());
    final String one = "one";
    final String two = "two";
    final String three = "three";
    bag.add(((T)(two)));
    bag.add(((T)(three)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5820,bag,5819,bag.first());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5821,one);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5823,bag,5822,bag.last());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5824,two);
    final Comparator<? super T> c = bag.comparator();
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5825,(c == null));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:PredicatedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
@org.junit.Test(timeout = 1000)
public void testSortOrder_remove1367() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testSortOrder_remove1367");
    final SortedBag<T> bag = decorateBag(new org.apache.commons.collections4.bag.TreeBag<T>(), stringPredicate());
    final String one = "one";
    final String two = "two";
    final String three = "three";
    bag.add(((T)(two)));
    bag.add(((T)(three)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5820,bag,5819,bag.first());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5821,one);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5823,bag,5822,bag.last());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5824,two);
    final Comparator<? super T> c = bag.comparator();
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5825,(c == null));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:TransformedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
@org.junit.Test(timeout = 1000)
public void testTransformedBag_add1790() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testTransformedBag_add1790");
    final SortedBag<T> bag = org.apache.commons.collections4.bag.TransformedSortedBag.transformingSortedBag(new TreeBag<T>(), ((org.apache.commons.collections4.Transformer<T, T>)(org.apache.commons.collections4.collection.TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5827,bag,5826,bag.size());
    final Object[] els = new Object[]{ "1" , "3" , "5" , "7" , "2" , "4" , "6" };
    for (int i = 0 ; i < (els.length) ; i++) {
        bag.add(((T)(els[i])));
        bag.add(((T)(els[i])));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5828,(i + 1));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5830,bag,5829,bag.size());
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5832,bag,5831,bag.contains(java.lang.Integer.valueOf(((java.lang.String)(els[i])))));
    }
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5851,bag,5850,bag.remove(java.lang.Integer.valueOf(((java.lang.String)(els[0])))));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:TransformedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
public void testTransformedBag() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testTransformedBag");
    final SortedBag<T> bag = org.apache.commons.collections4.bag.TransformedSortedBag.transformingSortedBag(new TreeBag<T>(), ((org.apache.commons.collections4.Transformer<T, T>)(org.apache.commons.collections4.collection.TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5827,bag,5826,bag.size());
    final Object[] els = new Object[]{ "1" , "3" , "5" , "7" , "2" , "4" , "6" };
    for (int i = 0 ; i < (els.length) ; i++) {
        bag.add(((T)(els[i])));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5828,(i + 1));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5830,bag,5829,bag.size());
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5832,bag,5831,bag.contains(java.lang.Integer.valueOf(((java.lang.String)(els[i])))));
    }
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5851,bag,5850,bag.remove(java.lang.Integer.valueOf(((java.lang.String)(els[0])))));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:TransformedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
public void testTransformedBag_literalMutation1631() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testTransformedBag_literalMutation1631");
    final SortedBag<T> bag = org.apache.commons.collections4.bag.TransformedSortedBag.transformingSortedBag(new TreeBag<T>(), ((org.apache.commons.collections4.Transformer<T, T>)(org.apache.commons.collections4.collection.TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5827,bag,5826,bag.size());
    final Object[] els = new Object[]{ "1" , "3" , "5" , "7" , "2" , "4" , "6" };
    for (int i = 0 ; i < (els.length) ; i++) {
        bag.add(((T)(els[i])));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5828,(i + 1));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5830,bag,5829,bag.size());
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5832,bag,5831,bag.contains(java.lang.Integer.valueOf(((java.lang.String)(els[i])))));
    }
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5851,bag,5850,bag.remove(java.lang.Integer.valueOf(((java.lang.String)(els[0])))));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:TransformedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
public void testTransformedBag_literalMutation1632() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testTransformedBag_literalMutation1632");
    final SortedBag<T> bag = org.apache.commons.collections4.bag.TransformedSortedBag.transformingSortedBag(new TreeBag<T>(), ((org.apache.commons.collections4.Transformer<T, T>)(org.apache.commons.collections4.collection.TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5827,bag,5826,bag.size());
    final Object[] els = new Object[]{ "foo" , "3" , "5" , "7" , "2" , "4" , "6" };
    for (int i = 0 ; i < (els.length) ; i++) {
        bag.add(((T)(els[i])));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5828,(i + 1));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5830,bag,5829,bag.size());
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5832,bag,5831,bag.contains(java.lang.Integer.valueOf(((java.lang.String)(els[i])))));
    }
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5851,bag,5850,bag.remove(java.lang.Integer.valueOf(((java.lang.String)(els[0])))));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:TransformedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
public void testTransformedBag_literalMutation1633() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testTransformedBag_literalMutation1633");
    final SortedBag<T> bag = org.apache.commons.collections4.bag.TransformedSortedBag.transformingSortedBag(new TreeBag<T>(), ((org.apache.commons.collections4.Transformer<T, T>)(org.apache.commons.collections4.collection.TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5827,bag,5826,bag.size());
    final Object[] els = new Object[]{ "1" , "foo" , "5" , "7" , "2" , "4" , "6" };
    for (int i = 0 ; i < (els.length) ; i++) {
        bag.add(((T)(els[i])));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5828,(i + 1));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5830,bag,5829,bag.size());
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5832,bag,5831,bag.contains(java.lang.Integer.valueOf(((java.lang.String)(els[i])))));
    }
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5851,bag,5850,bag.remove(java.lang.Integer.valueOf(((java.lang.String)(els[0])))));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:TransformedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
public void testTransformedBag_literalMutation1634() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testTransformedBag_literalMutation1634");
    final SortedBag<T> bag = org.apache.commons.collections4.bag.TransformedSortedBag.transformingSortedBag(new TreeBag<T>(), ((org.apache.commons.collections4.Transformer<T, T>)(org.apache.commons.collections4.collection.TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5827,bag,5826,bag.size());
    final Object[] els = new Object[]{ "1" , "3" , "foo" , "7" , "2" , "4" , "6" };
    for (int i = 0 ; i < (els.length) ; i++) {
        bag.add(((T)(els[i])));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5828,(i + 1));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5830,bag,5829,bag.size());
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5832,bag,5831,bag.contains(java.lang.Integer.valueOf(((java.lang.String)(els[i])))));
    }
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5851,bag,5850,bag.remove(java.lang.Integer.valueOf(((java.lang.String)(els[0])))));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:TransformedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
public void testTransformedBag_literalMutation1635() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testTransformedBag_literalMutation1635");
    final SortedBag<T> bag = org.apache.commons.collections4.bag.TransformedSortedBag.transformingSortedBag(new TreeBag<T>(), ((org.apache.commons.collections4.Transformer<T, T>)(org.apache.commons.collections4.collection.TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5827,bag,5826,bag.size());
    final Object[] els = new Object[]{ "1" , "3" , "5" , "foo" , "2" , "4" , "6" };
    for (int i = 0 ; i < (els.length) ; i++) {
        bag.add(((T)(els[i])));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5828,(i + 1));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5830,bag,5829,bag.size());
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5832,bag,5831,bag.contains(java.lang.Integer.valueOf(((java.lang.String)(els[i])))));
    }
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5851,bag,5850,bag.remove(java.lang.Integer.valueOf(((java.lang.String)(els[0])))));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:TransformedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
public void testTransformedBag_literalMutation1636() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testTransformedBag_literalMutation1636");
    final SortedBag<T> bag = org.apache.commons.collections4.bag.TransformedSortedBag.transformingSortedBag(new TreeBag<T>(), ((org.apache.commons.collections4.Transformer<T, T>)(org.apache.commons.collections4.collection.TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5827,bag,5826,bag.size());
    final Object[] els = new Object[]{ "1" , "3" , "5" , "7" , "foo" , "4" , "6" };
    for (int i = 0 ; i < (els.length) ; i++) {
        bag.add(((T)(els[i])));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5828,(i + 1));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5830,bag,5829,bag.size());
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5832,bag,5831,bag.contains(java.lang.Integer.valueOf(((java.lang.String)(els[i])))));
    }
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5851,bag,5850,bag.remove(java.lang.Integer.valueOf(((java.lang.String)(els[0])))));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:TransformedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
public void testTransformedBag_literalMutation1637() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testTransformedBag_literalMutation1637");
    final SortedBag<T> bag = org.apache.commons.collections4.bag.TransformedSortedBag.transformingSortedBag(new TreeBag<T>(), ((org.apache.commons.collections4.Transformer<T, T>)(org.apache.commons.collections4.collection.TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5827,bag,5826,bag.size());
    final Object[] els = new Object[]{ "1" , "3" , "5" , "7" , "2" , "foo" , "6" };
    for (int i = 0 ; i < (els.length) ; i++) {
        bag.add(((T)(els[i])));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5828,(i + 1));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5830,bag,5829,bag.size());
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5832,bag,5831,bag.contains(java.lang.Integer.valueOf(((java.lang.String)(els[i])))));
    }
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5851,bag,5850,bag.remove(java.lang.Integer.valueOf(((java.lang.String)(els[0])))));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:TransformedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
public void testTransformedBag_literalMutation1638() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testTransformedBag_literalMutation1638");
    final SortedBag<T> bag = org.apache.commons.collections4.bag.TransformedSortedBag.transformingSortedBag(new TreeBag<T>(), ((org.apache.commons.collections4.Transformer<T, T>)(org.apache.commons.collections4.collection.TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5827,bag,5826,bag.size());
    final Object[] els = new Object[]{ "1" , "3" , "5" , "7" , "2" , "4" , "foo" };
    for (int i = 0 ; i < (els.length) ; i++) {
        bag.add(((T)(els[i])));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5828,(i + 1));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5830,bag,5829,bag.size());
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5832,bag,5831,bag.contains(java.lang.Integer.valueOf(((java.lang.String)(els[i])))));
    }
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5851,bag,5850,bag.remove(java.lang.Integer.valueOf(((java.lang.String)(els[0])))));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:TransformedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
public void testTransformedBag_literalMutation1639() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testTransformedBag_literalMutation1639");
    final SortedBag<T> bag = org.apache.commons.collections4.bag.TransformedSortedBag.transformingSortedBag(new TreeBag<T>(), ((org.apache.commons.collections4.Transformer<T, T>)(org.apache.commons.collections4.collection.TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5827,bag,5826,bag.size());
    final Object[] els = new Object[]{ "1" , "3" , "5" , "7" , "2" , "4" , "6" };
    for (int i = -1 ; i < (els.length) ; i++) {
        bag.add(((T)(els[i])));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5828,(i + 1));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5830,bag,5829,bag.size());
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5832,bag,5831,bag.contains(java.lang.Integer.valueOf(((java.lang.String)(els[i])))));
    }
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5851,bag,5850,bag.remove(java.lang.Integer.valueOf(((java.lang.String)(els[0])))));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:TransformedSortedBagTest.java   
@SuppressWarnings(value = "unchecked")
@org.junit.Test(timeout = 1000)
public void testTransformedBag_remove1370() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testTransformedBag_remove1370");
    final SortedBag<T> bag = org.apache.commons.collections4.bag.TransformedSortedBag.transformingSortedBag(new TreeBag<T>(), ((org.apache.commons.collections4.Transformer<T, T>)(org.apache.commons.collections4.collection.TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER)));
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5827,bag,5826,bag.size());
    final Object[] els = new Object[]{ "1" , "3" , "5" , "7" , "2" , "4" , "6" };
    for (int i = 0 ; i < (els.length) ; i++) {
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5828,(i + 1));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5830,bag,5829,bag.size());
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5832,bag,5831,bag.contains(java.lang.Integer.valueOf(((java.lang.String)(els[i])))));
    }
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5851,bag,5850,bag.remove(java.lang.Integer.valueOf(((java.lang.String)(els[0])))));
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:UnmodifiableSortedBagTest.java   
public void testDecorateFactory() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testDecorateFactory");
    final SortedBag<E> queue = makeFullCollection();
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5866,queue);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5872,null,5871,org.apache.commons.collections4.bag.UnmodifiableSortedBag.unmodifiableSortedBag(queue));
    try {
        org.apache.commons.collections4.bag.UnmodifiableSortedBag.unmodifiableSortedBag(null);
    } catch (final IllegalArgumentException ex) {
    }
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:UnmodifiableSortedBagTest.java   
@org.junit.Test(timeout = 1000)
public void testDecorateFactory_add1794() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testDecorateFactory_add1794");
    final SortedBag<E> queue = makeFullCollection();
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5866,queue);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5872,null,5871,org.apache.commons.collections4.bag.UnmodifiableSortedBag.unmodifiableSortedBag(queue));
    try {
        org.apache.commons.collections4.bag.UnmodifiableSortedBag.unmodifiableSortedBag(null);
        org.apache.commons.collections4.bag.UnmodifiableSortedBag.unmodifiableSortedBag(null);
    } catch (final IllegalArgumentException ex) {
    }
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:TreeBagTest.java   
@SuppressWarnings(value = "unchecked")
public SortedBag<T> setupBag() {
    final SortedBag<T> bag = makeObject();
    bag.add(((T)("C")));
    bag.add(((T)("A")));
    bag.add(((T)("B")));
    bag.add(((T)("D")));
    return bag;
}
项目:sosiefier    文件:TreeBagTest.java   
public void testOrdering() {
    fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testOrdering");
    final Bag<T> bag = setupBag();
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5859,bag.toArray()[0]);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5860,bag.toArray()[1]);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5861,bag.toArray()[2]);
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5863,((org.apache.commons.collections4.SortedBag<T>)(bag)),5862,((org.apache.commons.collections4.SortedBag<T>)(bag)).first());
    fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5865,((org.apache.commons.collections4.SortedBag<T>)(bag)),5864,((org.apache.commons.collections4.SortedBag<T>)(bag)).last());
    fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
}
项目:sosiefier    文件:CollectionSortedBagTest.java   
/** 
     * Compare the current serialized form of the Bag
     * against the canonical version in SVN.
     */
public void testFullBagCompatibility() throws IOException, ClassNotFoundException {
        fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testFullBagCompatibility");
        final SortedBag<T> bag = ((SortedBag<T>)(makeFullCollection()));
        if (((bag instanceof java.io.Serializable) && (!(skipSerializedCanonicalTests()))) && (isTestSerialization())) {
            final SortedBag<?> bag2 = ((SortedBag<?>)(readExternalFormFromDisk(getCanonicalFullCollectionName(bag))));
            fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5801,bag,5800,bag.size());
            fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5803,bag2,5802,bag2.size());
            fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5804,bag);
            fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5805,bag2);
        } 
        fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
    }
项目:sosiefier    文件:PredicatedSortedBagTest.java   
protected SortedBag<T> decorateBag(final SortedBag<T> bag, final Predicate<T> predicate) {
    return PredicatedSortedBag.predicatedSortedBag(bag, predicate);
}
项目:sosiefier    文件:PredicatedSortedBagTest.java   
@Override
public SortedBag<T> makeObject() {
    return decorateBag(new org.apache.commons.collections4.bag.TreeBag<T>(), truePredicate);
}
项目:sosiefier    文件:PredicatedSortedBagTest.java   
protected SortedBag<T> makeTestBag() {
    return decorateBag(new org.apache.commons.collections4.bag.TreeBag<T>(), stringPredicate());
}
项目:sosiefier    文件:AbstractSortedBagTest.java   
/** 
     * {@inheritDoc}
     */
@Override
    public SortedBag<T> makeFullCollection() {
        return ((SortedBag<T>)(super.makeFullCollection()));
    }
项目:sosiefier    文件:TransformedSortedBagTest.java   
@Override
@SuppressWarnings(value = "unchecked")
public SortedBag<T> makeObject() {
    return org.apache.commons.collections4.bag.TransformedSortedBag.transformingSortedBag(new TreeBag<T>(), ((org.apache.commons.collections4.Transformer<T, T>)(org.apache.commons.collections4.collection.TransformedCollectionTest.NOOP_TRANSFORMER)));
}
项目:sosiefier    文件:UnmodifiableSortedBagTest.java   
@Override
public SortedBag<E> makeObject() {
    return org.apache.commons.collections4.bag.UnmodifiableSortedBag.unmodifiableSortedBag(new TreeBag<E>());
}
项目:sosiefier    文件:UnmodifiableSortedBagTest.java   
@Override
public SortedBag<E> makeFullCollection() {
    final SortedBag<E> bag = new TreeBag<E>();
    bag.addAll(java.util.Arrays.asList(getFullElements()));
    return org.apache.commons.collections4.bag.UnmodifiableSortedBag.unmodifiableSortedBag(bag);
}
项目:sosiefier    文件:UnmodifiableSortedBagTest.java   
@Override
public SortedBag<E> getCollection() {
    return super.getCollection();
}
项目:sosiefier    文件:TreeBagTest.java   
@Override
public SortedBag<T> makeObject() {
    return new TreeBag<T>();
}
项目:HCFCore    文件:UnmodifiableSortedBag.java   
/**
 * Factory method to create an unmodifiable bag.
 * <p>
 * If the bag passed in is already unmodifiable, it is returned.
 *
 * @param <E> the type of the elements in the bag
 * @param bag  the bag to decorate, must not be null
 * @return an unmodifiable SortedBag
 * @throws NullPointerException if bag is null
 * @since 4.0
 */
public static <E> SortedBag<E> unmodifiableSortedBag(final SortedBag<E> bag) {
    if (bag instanceof Unmodifiable) {
        return bag;
    }
    return new UnmodifiableSortedBag<E>(bag);
}
项目:HCFCore    文件:TransformedSortedBag.java   
/**
 * Factory method to create a transforming sorted bag that will transform
 * existing contents of the specified sorted bag.
 * <p>
 * If there are any elements already in the bag being decorated, they
 * will be transformed by this method.
 * Contrast this with {@link #transformingSortedBag(SortedBag, Transformer)}.
 *
 * @param <E> the type of the elements in the bag
 * @param bag  the bag to decorate, must not be null
 * @param transformer  the transformer to use for conversion, must not be null
 * @return a new transformed SortedBag
 * @throws NullPointerException if bag or transformer is null
 * @since 4.0
 */
public static <E> TransformedSortedBag<E> transformedSortedBag(final SortedBag<E> bag,
        final Transformer<? super E, ? extends E> transformer) {

    final TransformedSortedBag<E>  decorated = new TransformedSortedBag<E>(bag, transformer);
    if (bag.size() > 0) {
        @SuppressWarnings("unchecked") // bag is type E
        final E[] values = (E[]) bag.toArray(); // NOPMD - false positive for generics
        bag.clear();
        for (final E value : values) {
            decorated.decorated().add(transformer.transform(value));
        }
    }
    return decorated;
}
项目:HCFCore    文件:UnmodifiableSortedBag.java   
/**
 * Factory method to create an unmodifiable bag.
 * <p>
 * If the bag passed in is already unmodifiable, it is returned.
 *
 * @param <E> the type of the elements in the bag
 * @param bag  the bag to decorate, must not be null
 * @return an unmodifiable SortedBag
 * @throws NullPointerException if bag is null
 * @since 4.0
 */
public static <E> SortedBag<E> unmodifiableSortedBag(final SortedBag<E> bag) {
    if (bag instanceof Unmodifiable) {
        return bag;
    }
    return new UnmodifiableSortedBag<E>(bag);
}