public final class Lists extends Object
Modifier and Type | Method and Description |
---|---|
static <T> boolean |
equals(List<? extends T> listA,
List<? extends T> listB,
Matcher<? super T> matcher)
Useful for generated classes, which don't override the equals method (e.g.
|
static <T> boolean |
equalsIgnoreOrder(List<? extends T> listA,
List<? extends T> listB,
Comparator<? super T> comparator)
Useful for generated classes, which don't override the equals method (e.g.
|
static <E> E |
getFirst(List<E> list)
Gets the first element of the specified list.
|
static <T extends Comparable<? super T>> |
getInsertionPoint(List<? extends T> sortedList,
T key) |
static <T> int |
getInsertionPoint(List<? extends T> sortedList,
T key,
Comparator<? super T> comparator) |
static <E> E |
getLast(List<E> list)
Gets the last element of the specified list.
|
public static <T> boolean equals(List<? extends T> listA, List<? extends T> listB, Matcher<? super T> matcher)
T
- listA
- listB
- matcher
- public static <T> boolean equalsIgnoreOrder(List<? extends T> listA, List<? extends T> listB, Comparator<? super T> comparator)
T
- listA
- listB
- comparator
- public static <E> E getFirst(List<E> list)
E
- the type of the elements of the listlist
- the listpublic static <E> E getLast(List<E> list)
E
- the type of the elements of the listlist
- the listpublic static <T extends Comparable<? super T>> int getInsertionPoint(List<? extends T> sortedList, T key)
public static <T> int getInsertionPoint(List<? extends T> sortedList, T key, Comparator<? super T> comparator)
Copyright © 2002–2017 SoftSmithy. All rights reserved.