com.drew.lang.Iterables Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of metadata-extractor Show documentation
Show all versions of metadata-extractor Show documentation
This is a fork of com.drewnoakes' metadata-extractor that relocates com.adobe.internal to com.adobe.
Java library for extracting EXIF, IPTC, XMP, ICC and other metadata from image and video files.
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;
}
}