diff options
author | Eduardo Pedroni <e.pedroni91@gmail.com> | 2016-08-07 22:18:55 +0200 |
---|---|---|
committer | Eduardo Pedroni <e.pedroni91@gmail.com> | 2016-08-07 22:18:55 +0200 |
commit | f7fe057b745d3f0e19b5dd6bd1819b11fc89c551 (patch) | |
tree | 1d19673aa4170f91248682a21db9fbc7c3945f4e /src/eu/equalparts/cardbase/sorting | |
parent | 64c8e926d167a17865a6c3d86e48b383d413b569 (diff) |
Added filtering, still not working fully
Diffstat (limited to 'src/eu/equalparts/cardbase/sorting')
-rw-r--r-- | src/eu/equalparts/cardbase/sorting/CardSorting.java | 4 |
1 files changed, 1 insertions, 3 deletions
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<Card> sortByField(List<Card> cards, String fieldName) throws NoSuchFieldException { + public static void sortByField(List<Card> cards, String fieldName) throws NoSuchFieldException { cards.sort(new CardComparator(Card.class.getDeclaredField(fieldName))); - return cards; } } |