All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.java.compiler.share.classes.com.itsaky.androidide.zipfs2.Collections2 Maven / Gradle / Ivy

Go to download

"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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy