| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - the member type.public interface ExtendedReorderableList<T>
An extended interface, random access list permitting element reordering, but not neccessarily inserting/removing elements.
| Method Summary | |
|---|---|
 void | 
orderLike(List<? extends T> example)
Reorders this list's elements by example.  | 
 void | 
swap(int i,
     int j)
exchanges the elements located at indices i and j. | 
| Methods inherited from interface ch.elca.el4j.util.collections.ExtendedList | 
|---|
filtered, mapped, toArray | 
| Methods inherited from interface java.util.List | 
|---|
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray | 
| Method Detail | 
|---|
void swap(int i,
          int j)
i and j.
i - ...j - ...
void orderLike(List<? extends T> example)
               throws NoSuchElementException
example as far as
 element equality is concerned, or throws
 a NoSuchElementException if this is not possible.
 In either case, the order of the remaining elements may be affected.
 This method may require quadratic time.
 Formally, if this method completes normally, the condition
 ∀ i < example.size();
   c.apply(this.get(i)).equals(example.get(i))
  is true.
example - a list whose elements are in the descired order
NoSuchElementException - if the example's order can not be
                                duplicated by reordering alone.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||