-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
8
A DESCRIPTION OF THE REQUEST :
Add to java.util.Collection<E>:
default boolean addAll(E... elements) {
return addAll(Arrays.asList(elements));
}
JUSTIFICATION :
Collection.addAll(elements) would be much more concise and readable than Collection.addAll(Arrays.asList(elements)), especially when one has many arrays to combine in a Collection.
Add to java.util.Collection<E>:
default boolean addAll(E... elements) {
return addAll(Arrays.asList(elements));
}
JUSTIFICATION :
Collection.addAll(elements) would be much more concise and readable than Collection.addAll(Arrays.asList(elements)), especially when one has many arrays to combine in a Collection.
- duplicates
-
JDK-8161033 Add default method addAll(T...elements) to java.util.Collection
-
- Closed
-
- relates to
-
JDK-8297283 Improve Unsupported exception messages for java.util.AbstractList
-
- Open
-
-
JDK-8161033 Add default method addAll(T...elements) to java.util.Collection
-
- Closed
-