mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-10 20:15:42 +00:00
Use varargs.
This commit is contained in:
parent
11eb27dfb0
commit
ce7496d175
@ -60,19 +60,19 @@ public class CompositeSetTest<E> extends AbstractSetTest<E> {
|
|||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void testContains() {
|
public void testContains() {
|
||||||
final CompositeSet<E> set = new CompositeSet<>(new Set[]{ buildOne(), buildTwo() });
|
final CompositeSet<E> set = new CompositeSet<>(buildOne(), buildTwo());
|
||||||
assertTrue(set.contains("1"));
|
assertTrue(set.contains("1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void testContainsAll() {
|
public void testContainsAll() {
|
||||||
final CompositeSet<E> set = new CompositeSet<>(new Set[]{ buildOne(), buildTwo() });
|
final CompositeSet<E> set = new CompositeSet<>(buildOne(), buildTwo());
|
||||||
assertFalse(set.containsAll(null));
|
assertFalse(set.containsAll(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void testRemoveAll() {
|
public void testRemoveAll() {
|
||||||
final CompositeSet<E> set = new CompositeSet<>(new Set[]{ buildOne(), buildTwo() });
|
final CompositeSet<E> set = new CompositeSet<>(buildOne(), buildTwo());
|
||||||
assertFalse(set.removeAll(null));
|
assertFalse(set.removeAll(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ public class CompositeSetTest<E> extends AbstractSetTest<E> {
|
|||||||
public void testRemoveUnderlying() {
|
public void testRemoveUnderlying() {
|
||||||
final Set<E> one = buildOne();
|
final Set<E> one = buildOne();
|
||||||
final Set<E> two = buildTwo();
|
final Set<E> two = buildTwo();
|
||||||
final CompositeSet<E> set = new CompositeSet<>(new Set[] { one, two });
|
final CompositeSet<E> set = new CompositeSet<>(one, two);
|
||||||
one.remove("1");
|
one.remove("1");
|
||||||
assertFalse(set.contains("1"));
|
assertFalse(set.contains("1"));
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ public class CompositeSetTest<E> extends AbstractSetTest<E> {
|
|||||||
public void testRemoveComposited() {
|
public void testRemoveComposited() {
|
||||||
final Set<E> one = buildOne();
|
final Set<E> one = buildOne();
|
||||||
final Set<E> two = buildTwo();
|
final Set<E> two = buildTwo();
|
||||||
final CompositeSet<E> set = new CompositeSet<>(new Set[] { one, two });
|
final CompositeSet<E> set = new CompositeSet<>(one, two);
|
||||||
set.remove("1");
|
set.remove("1");
|
||||||
assertFalse(one.contains("1"));
|
assertFalse(one.contains("1"));
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ public class CompositeSetTest<E> extends AbstractSetTest<E> {
|
|||||||
public void testFailedCollisionResolution() {
|
public void testFailedCollisionResolution() {
|
||||||
final Set<E> one = buildOne();
|
final Set<E> one = buildOne();
|
||||||
final Set<E> two = buildTwo();
|
final Set<E> two = buildTwo();
|
||||||
final CompositeSet<E> set = new CompositeSet<>(new Set[] { one, two });
|
final CompositeSet<E> set = new CompositeSet<>(one, two);
|
||||||
set.setMutator(new SetMutator<E>() {
|
set.setMutator(new SetMutator<E>() {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user