java.lang.Object
org.apache.jena.atlas.lib.ListUtils
Various things for lists
-
Method Summary
Modifier and TypeMethodDescriptionasList(int... values) static <T> booleanequalsUnordered(List<T> list1, List<T> list2) Compare two lists, same elements, order of the lists may be different, elements must have the same cardinality.static <T> Tstatic <T> List<T>Asymmetric diff of two unordered lists, returning the elements inlist1not inlist2.listDiffBoth(List<T> list1, List<T> list2) Diff of two unordered lists, returning the elements in list1 not in list2, and the elements of list2 not in list1.Return a list of lists of all the elements of collection in every order Easy to run out of heap memory.static <T> voidprint(IndentedWriter out, List<T> list) static <T> voidprint(IndentedWriter out, List<T> list, CharSequence sep) static Stringstr(int[] array) static Stringstr(long[] array) static <T> Stringstr(T[] array) static <T> List<T>static <T> List<T>
-
Method Details
-
unique
-
asList
-
last
-
toList
-
str
-
str
-
str
-
print
-
print
-
equalsUnordered
Compare two lists, same elements, order of the lists may be different, elements must have the same cardinality. -
listDiff
Asymmetric diff of two unordered lists, returning the elements inlist1not inlist2. Cardinality is significant. -
listDiffBoth
Diff of two unordered lists, returning the elements in list1 not in list2, and the elements of list2 not in list1. Cardinality is significant. -
permute
Return a list of lists of all the elements of collection in every order Easy to run out of heap memory. See alsoorg.apache.jena.ext.com.google.common.collect.Collections2#permutations
-