Example usage for android.util ArraySet addAll

List of usage examples for android.util ArraySet addAll

Introduction

In this page you can find the example usage for android.util ArraySet addAll.

Prototype

@Override
public boolean addAll(Collection<? extends E> collection) 

Source Link

Document

Perform an #add(Object) of all values in collection

Usage

From source file:com.androidinspain.deskclock.Utils.java

/**
 * {@link ArraySet} is @hide prior to {@link Build.VERSION_CODES#M}.
 *//*from w w  w. j  a v  a 2 s. c  o  m*/
@SuppressLint("NewApi")
public static <E> ArraySet<E> newArraySet(Collection<E> collection) {
    final ArraySet<E> arraySet = new ArraySet<>(collection.size());
    arraySet.addAll(collection);
    return arraySet;
}

From source file:com.android.deskclock.Utils.java

public static <E> ArraySet<E> newArraySet(Collection<E> collection) {
    final ArraySet<E> arraySet = new ArraySet<>(collection.size());
    arraySet.addAll(collection);
    return arraySet;
}