de.danielbechler.util
Class Collections

java.lang.Object
  extended by de.danielbechler.util.Collections

public class Collections
extends Object

Author:
Daniel Bechler

Method Summary
static
<T> boolean
containsAny(Iterable<T> haystack, Iterable<T> needles)
           
static
<T> Collection<? extends T>
filteredCopyOf(Collection<? extends T> source, Collection<? extends T> filter)
           
static
<T> T
firstElementOf(Collection<? extends T> items)
           
static
<T> T
get(Iterable<T> haystack, T needle)
           
static
<T> int
indexOf(Iterable<? extends T> haystack, T needle)
           
static boolean isEmpty(Collection<?> c)
           
static
<T> T
lastElementOf(Collection<? extends T> items)
           
static
<T> T
lastElementOf(List<? extends T> items)
           
static
<T> Collection<? extends T>
maskedCopyOf(Collection<? extends T> source, Collection<? extends T> mask)
           
static
<T> Set<T>
setOf(Collection<T> c)
           
static
<T> Set<T>
setOf(T... c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setOf

public static <T> Set<T> setOf(T... c)

setOf

public static <T> Set<T> setOf(Collection<T> c)

isEmpty

public static boolean isEmpty(Collection<?> c)

containsAny

public static <T> boolean containsAny(Iterable<T> haystack,
                                      Iterable<T> needles)

get

public static <T> T get(Iterable<T> haystack,
                        T needle)

indexOf

public static <T> int indexOf(Iterable<? extends T> haystack,
                              T needle)

filteredCopyOf

public static <T> Collection<? extends T> filteredCopyOf(Collection<? extends T> source,
                                                         Collection<? extends T> filter)

maskedCopyOf

public static <T> Collection<? extends T> maskedCopyOf(Collection<? extends T> source,
                                                       Collection<? extends T> mask)

firstElementOf

public static <T> T firstElementOf(Collection<? extends T> items)

lastElementOf

public static <T> T lastElementOf(List<? extends T> items)

lastElementOf

public static <T> T lastElementOf(Collection<? extends T> items)


Copyright © 2012. All Rights Reserved.