List of utility methods to do List Swap
void | swap(final L list1, final L list2, final int index) swap final E temp = list1.get(index);
list1.set(index, list2.get(index));
list2.set(index, temp);
|
void | swap(final List> list, final int index0, final int index1) swap Collections.swap(list, index0, index1); |
void | swap(final List Swaps two elements in a list. if (index1 != index2) { final T value = list.get(index1); list.set(index1, list.get(index2)); list.set(index2, value); |
void | swap(final List swap if (i1 == i2) { return; T temp = list.get(i1); list.set(i1, list.get(i2)); list.set(i2, temp); |
void | swap(List list, int i, int j) Swaps the values in the list at the given positions Object tmp = list.get(i); list.set(i, list.get(j)); list.set(j, tmp); |
void | swap(List list, Object object1, Object object2) Swap object1 with object2 in the list. int indexObject1 = list.indexOf(object1); int indexObject2 = list.indexOf(object2); list.set(indexObject2, object1); list.set(indexObject1, object2); |
void | swap(List a, int i, int j) swap final A tmp = a.get(i);
a.set(i, a.get(j));
a.set(j, tmp);
|
void | swap(List swap if (index1_ == index2_) return; T item1 = items.get(index1_); T item2 = items.get(index2_); if (item1 != null) items.set(index2_, item1); if (item2 != null) items.set(index1_, item2); ... |
void | swap(List Swaps two entries in a list. T v1 = list.get(i1), v2 = list.get(i2); list.set(i1, v2); list.set(i2, v1); |
List | swap(List swap list.set(index1, list.set(index2, list.get(index1)));
return list;
|