From d9854415ffb5affb5021146a61bf76ebec0769e2 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Mon, 9 May 2016 22:19:58 +0200 Subject: Reorder members --- src/ch/epfl/xblast/Lists.java | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/ch/epfl') diff --git a/src/ch/epfl/xblast/Lists.java b/src/ch/epfl/xblast/Lists.java index da3f919..cc6a1c8 100644 --- a/src/ch/epfl/xblast/Lists.java +++ b/src/ch/epfl/xblast/Lists.java @@ -65,6 +65,20 @@ public final class Lists { return r; } + /** + * Returns an immutable copy of the given list, sorted using the supplied comparator. + * + * @param l the list to sort + * @param cmp the Comparator to use + * @param the type of the list's elements + * @return the sorted list + */ + public static List sorted(List l, Comparator cmp) { + List r = new ArrayList<>(l); + Collections.sort(r, cmp); + return Collections.unmodifiableList(r); + } + /** * Returns a copy of the given list surrounded with element e. * @@ -167,18 +181,4 @@ public final class Lists { .collect(Collectors.toList())); } - /** - * Returns an immutable copy of the given list, sorted using the supplied comparator. - * - * @param l the list to sort - * @param cmp the Comparator to use - * @param the type of the list's elements - * @return the sorted list - */ - public static List sorted(List l, Comparator cmp) { - List r = new ArrayList<>(l); - Collections.sort(r, cmp); - return Collections.unmodifiableList(r); - } - } -- cgit v1.2.3