|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.common.util.ECollections
Support for empty
and unmodifiable
EList
s.
Field Summary | |
static EList |
EMPTY_ELIST
An unmodifiable empty list with an efficient reusable iterator. |
Method Summary | |
static int |
indexOf(List list,
Object o,
int fromIndex)
Searches for the first occurence of the given argument in list starting from a specified index. |
static void |
reverse(EList list)
Reverses the order of the elements in the specified EList. |
static void |
setEList(EList eList,
List prototypeList)
Sets the eList 's contents and order to be exactly that of the prototype list.
|
static void |
sort(EList list)
Sorts the specified list. |
static void |
sort(EList list,
Comparator comparator)
Sorts the specified list based on the order defined by the specified comparator. |
static EList |
unmodifiableEList(EList list)
Returns an unmodifiable view of the list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final EList EMPTY_ELIST
Method Detail |
public static void reverse(EList list)
public static int indexOf(List list, Object o, int fromIndex)
list
- o
- an object (can be null)fromIndex
-
public static void sort(EList list)
Collections.sort(java.util.List)
to
avoid errors when sorting unique lists.
public static void sort(EList list, Comparator comparator)
Collections.sort(java.util.List, java.util.Comparator)
to
avoid errors when sorting unique lists.
public static void setEList(EList eList, List prototypeList)
eList
's contents and order to be exactly that of the prototype
list.
This implementation mimimizes the number of notifications the operation will produce.
Objects already in the list will be moved, missing objects will be added, and extra objects will be removed.
If eList
's contents and order are already exactly that of the prototype
list,
no change will be made.
eList
- the list to set.prototypeList
- the list representing the desired content and order.public static EList unmodifiableEList(EList list)
|
Copyright 2001-2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |