The list of methods to do List Reverse are organized into topic(s).
List>
addReverse(List list, List append) Adds the contents of one list to the other in reverse order.
for (ListIterator i = append.listIterator(append.size()); i.hasPrevious();)
list.add(i.previous());
return list;
int
compareVersions(List list1, List list2) INTERNAL: Compares two lists of Integers -1, 0, 1 means the first list is less than, equal, greater than the second list.
int n = Math.max(list1.size(), list2.size());
int res = 0;
for (int i = 0; i < n; i++) {
int l1 = 0;
if (i < list1.size()) {
l1 = list1.get(i);
int l2 = 0;
...
int
compareVersions(List version1, List version2) compare Versions
for (Iterator<Integer> it1 = version1.iterator(), it2 = version2.iterator();;) {
if (!it1.hasNext()) {
return it2.hasNext() ? -1 : 0;
if (!it2.hasNext()) {
return it1.hasNext() ? 1 : 0;
Integer num1 = it1.next();
...
String
formatToIp(final List shortList, final boolean reverseOrder) Formats a List with short values into it's IP-Address representation.
if (shortList == null) {
return null;
if (reverseOrder) {
Collections.reverse(shortList);
return shortList.toString().replaceAll(",[ ]*", ".").replaceAll("[\\[\\]]", "");
Iterable
iterateReverse(final List elements)
iterate Reverse
return new Iterable<T>() {
@Override
public Iterator<T> iterator() {
return new Iterator<T>() {
ListIterator<T> it = elements.listIterator(elements.size());
@Override
public boolean hasNext() {
return it.hasPrevious();
...
String
listToArrowSep(List strings, String highlightFirst, String highlightSecond, boolean reversed) list To Arrow Sep
if (strings.isEmpty())
return "&6None";
StringBuilder sb = new StringBuilder();
for (String s : strings) {
if (s.equalsIgnoreCase(highlightFirst)) {
sb.append("&b").append(s).append("&4").append(reversed ? " <--- " : " ---> ");
} else if (s.equalsIgnoreCase(highlightSecond)) {
sb.append("&b").append(s).append("&7").append(reversed ? " <--- " : " ---> ");
...