org.eclipse.emf.ecp.internal.core.util
Class InternalUtil

java.lang.Object
  extended by org.eclipse.emf.ecp.internal.core.util.InternalUtil

public final class InternalUtil
extends Object

Author:
Eugen Neufeld

Method Summary
static
<E> Set<E>
getAddedElements(Collection<E> oldElements, Collection<E> newElements)
          Finds the set of all Elements that are in the new collection but not in the old.
static Set<String> getElementNames(Set<? extends ECPElement> elements)
          Returns the Set of names of a set of ECPElements.
static
<E> Set<E>
getRemovedElements(Collection<E> oldElements, Collection<E> newElements)
          Finds the set of all Elements that are in the old collection but not in the new.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getElementNames

public static Set<String> getElementNames(Set<? extends ECPElement> elements)
Returns the Set of names of a set of ECPElements.

Parameters:
elements - the set of elements to get the names for
Returns:
the set of names of this elements

getAddedElements

public static <E> Set<E> getAddedElements(Collection<E> oldElements,
                                          Collection<E> newElements)
Finds the set of all Elements that are in the new collection but not in the old.

Type Parameters:
E - the type of the elements
Parameters:
oldElements - the collection containing the old elements
newElements - the collection containing the new elements
Returns:
the Set of elements which are only in the newElements collection

getRemovedElements

public static <E> Set<E> getRemovedElements(Collection<E> oldElements,
                                            Collection<E> newElements)
Finds the set of all Elements that are in the old collection but not in the new.

Type Parameters:
E - the type of the elements
Parameters:
oldElements - the collection containing the old elements
newElements - the collection containing the new elements
Returns:
the Set of elements which are only in the oldElements collection


Copyright © 2014. All Rights Reserved.