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

org.pepsoft.util.CollectionUtils Maven / Gradle / Ivy

There is a newer version: 2.15.18
Show newest version
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.pepsoft.util;

import java.util.BitSet;

/**
 *
 * @author pepijn
 */
public final class CollectionUtils {
    private CollectionUtils() {
        // Prevent instantiation
    }
    
    public static BitSet bitSetOf(int... values) {
        BitSet bitSet = new BitSet(values[values.length - 1] + 1);
        for (int value: values) {
            bitSet.set(value);
        }
        return bitSet;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy