src.java.compiler.share.classes.com.itsaky.androidide.zipfs2.Collections2 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nb-javac-android Show documentation
Show all versions of nb-javac-android Show documentation
"nb-javac-android" (a fork of nb-javac) is patched to work in Android Runtime (ART).
The newest version!
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.itsaky.androidide.zipfs2;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
*
* @author itsaky
*/
public class Collections2 {
public static List listOf(T... values) {
final List result = new ArrayList<>();
if (values == null) {
return result;
}
result.addAll(Arrays.asList(values));
return result;
}
public static Set setOf(T... values) {
final Set result = new HashSet<>();
if (values == null) {
return result;
}
result.addAll(Arrays.asList(values));
return result;
}
}