From f7fe057b745d3f0e19b5dd6bd1819b11fc89c551 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Sun, 7 Aug 2016 22:18:55 +0200 Subject: Added filtering, still not working fully --- src/eu/equalparts/cardbase/sorting/CardSorting.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/eu/equalparts/cardbase/sorting') diff --git a/src/eu/equalparts/cardbase/sorting/CardSorting.java b/src/eu/equalparts/cardbase/sorting/CardSorting.java index 04413b9..e7f7c96 100644 --- a/src/eu/equalparts/cardbase/sorting/CardSorting.java +++ b/src/eu/equalparts/cardbase/sorting/CardSorting.java @@ -10,11 +10,9 @@ public abstract class CardSorting { /** * @param cards * @param fieldName the name of the field by which to sort. - * @return an unmodifiable collection representing the cardbase sorted in the required order. * @throws NoSuchFieldException if the field provided is invalid. */ - public static List sortByField(List cards, String fieldName) throws NoSuchFieldException { + public static void sortByField(List cards, String fieldName) throws NoSuchFieldException { cards.sort(new CardComparator(Card.class.getDeclaredField(fieldName))); - return cards; } } -- cgit v1.2.3