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

com.drew.lang.Iterables Maven / Gradle / Ivy

Go to download

Java library for extracting EXIF, IPTC, XMP, ICC and other metadata from image and video files.

There is a newer version: 2.19.0
Show newest version
package com.drew.lang;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @author Drew Noakes https://drewnoakes.com
 */
public class Iterables
{
    public static  List toList(Iterable iterable)
    {
        ArrayList list = new ArrayList();
        for (E item : iterable) {
            list.add(item);
        }
        return list;
    }

    public static  Set toSet(Iterable iterable)
    {
        HashSet set = new HashSet();
        for (E item : iterable) {
            set.add(item);
        }
        return set;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy