org.eclipse.emf.emfstore.internal.common
Class ESCollections

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.common.ESCollections

public final class ESCollections
extends Object

Collections related utility for internal use.

Author:
emueller

Method Summary
static
<T> com.google.common.base.Optional<T>
find(List<?> list, Class<T> clazz)
          Finds the first occurrence of a value that matches the given type within the given list.
static
<T> com.google.common.base.Optional<T>
find(Object[] array, Class<T> clazz)
          Finds the first occurrence of a value that matches the given type within the given object array.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

find

public static <T> com.google.common.base.Optional<T> find(Object[] array,
                                                          Class<T> clazz)
Finds the first occurrence of a value that matches the given type within the given object array.

Type Parameters:
T - the type to be matched
Parameters:
array - the array to be searched
clazz - the class type to be matched
Returns:
an Optional containing the matched value

find

public static <T> com.google.common.base.Optional<T> find(List<?> list,
                                                          Class<T> clazz)
Finds the first occurrence of a value that matches the given type within the given list.

Type Parameters:
T - the type to be matched
Parameters:
list - the list to be searched
clazz - the class type to be matched
Returns:
an Optional containing the matched value


Copyright © 2016. All Rights Reserved.