Merge
This commit is contained in:
commit
e731a74298
@ -2823,6 +2823,7 @@ public class Arrays {
|
|||||||
* @param a the array by which the list will be backed
|
* @param a the array by which the list will be backed
|
||||||
* @return a list view of the specified array
|
* @return a list view of the specified array
|
||||||
*/
|
*/
|
||||||
|
@SafeVarargs
|
||||||
public static <T> List<T> asList(T... a) {
|
public static <T> List<T> asList(T... a) {
|
||||||
return new ArrayList<>(a);
|
return new ArrayList<>(a);
|
||||||
}
|
}
|
||||||
|
@ -3827,6 +3827,7 @@ public class Collections {
|
|||||||
* @see Collection#addAll(Collection)
|
* @see Collection#addAll(Collection)
|
||||||
* @since 1.5
|
* @since 1.5
|
||||||
*/
|
*/
|
||||||
|
@SafeVarargs
|
||||||
public static <T> boolean addAll(Collection<? super T> c, T... elements) {
|
public static <T> boolean addAll(Collection<? super T> c, T... elements) {
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
for (T element : elements)
|
for (T element : elements)
|
||||||
|
@ -317,6 +317,7 @@ public abstract class EnumSet<E extends Enum<E>> extends AbstractSet<E>
|
|||||||
* or if <tt>rest</tt> is null
|
* or if <tt>rest</tt> is null
|
||||||
* @return an enum set initially containing the specified elements
|
* @return an enum set initially containing the specified elements
|
||||||
*/
|
*/
|
||||||
|
@SafeVarargs
|
||||||
public static <E extends Enum<E>> EnumSet<E> of(E first, E... rest) {
|
public static <E extends Enum<E>> EnumSet<E> of(E first, E... rest) {
|
||||||
EnumSet<E> result = noneOf(first.getDeclaringClass());
|
EnumSet<E> result = noneOf(first.getDeclaringClass());
|
||||||
result.add(first);
|
result.add(first);
|
||||||
|
@ -404,6 +404,7 @@ public abstract class SwingWorker<T, V> implements RunnableFuture<T> {
|
|||||||
* @see #process
|
* @see #process
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@SafeVarargs
|
||||||
protected final void publish(V... chunks) {
|
protected final void publish(V... chunks) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (doProcess == null) {
|
if (doProcess == null) {
|
||||||
|
@ -120,6 +120,7 @@ public abstract class AccumulativeRunnable<T> implements Runnable {
|
|||||||
* {@code Runnable} for execution.
|
* {@code Runnable} for execution.
|
||||||
* @param args the arguments to accumulate
|
* @param args the arguments to accumulate
|
||||||
*/
|
*/
|
||||||
|
@SafeVarargs
|
||||||
public final synchronized void add(T... args) {
|
public final synchronized void add(T... args) {
|
||||||
boolean isSubmitted = true;
|
boolean isSubmitted = true;
|
||||||
if (arguments == null) {
|
if (arguments == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user