From 1aeeeff291c12fe18f03600595ffe19083bd8672 Mon Sep 17 00:00:00 2001 From: Rubesh S Date: Sat, 28 Oct 2023 20:28:34 +0800 Subject: [PATCH] Fix style errors --- src/main/java/unicash/commons/util/Pair.java | 2 +- src/main/java/unicash/logic/parser/FilterCommandParser.java | 3 --- .../model/transaction/predicates/BooleanPredicatePair.java | 3 ++- .../predicates/TransactionContainsAllKeywordsPredicate.java | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/unicash/commons/util/Pair.java b/src/main/java/unicash/commons/util/Pair.java index b54df14f5b4..88be4fd75c4 100644 --- a/src/main/java/unicash/commons/util/Pair.java +++ b/src/main/java/unicash/commons/util/Pair.java @@ -5,7 +5,7 @@ * @param type parameter of the first type of {@code Object} to be contained * @param type parameter of the second type of {@code Object} to be contained */ -public class Pair { +public class Pair { private T t; private U u; diff --git a/src/main/java/unicash/logic/parser/FilterCommandParser.java b/src/main/java/unicash/logic/parser/FilterCommandParser.java index 7be0ae993d4..1ecadb2785f 100644 --- a/src/main/java/unicash/logic/parser/FilterCommandParser.java +++ b/src/main/java/unicash/logic/parser/FilterCommandParser.java @@ -9,12 +9,9 @@ import static unicash.logic.parser.CliSyntax.PREFIX_NAME; import static unicash.logic.parser.CliSyntax.PREFIX_TYPE; -import java.util.List; - import unicash.logic.commands.FilterCommand; import unicash.logic.parser.exceptions.ParseException; import unicash.model.category.Category; -import unicash.model.category.UniqueCategoryList; import unicash.model.commons.Amount; import unicash.model.transaction.DateTime; import unicash.model.transaction.Location; diff --git a/src/main/java/unicash/model/transaction/predicates/BooleanPredicatePair.java b/src/main/java/unicash/model/transaction/predicates/BooleanPredicatePair.java index 6070a7a1f6c..4dc5ce47994 100644 --- a/src/main/java/unicash/model/transaction/predicates/BooleanPredicatePair.java +++ b/src/main/java/unicash/model/transaction/predicates/BooleanPredicatePair.java @@ -1,9 +1,10 @@ package unicash.model.transaction.predicates; +import java.util.function.Predicate; + import unicash.commons.util.Pair; import unicash.model.transaction.Transaction; -import java.util.function.Predicate; /** * A wrapper class for containing Boolean and TransactionPredicate pairs. diff --git a/src/main/java/unicash/model/transaction/predicates/TransactionContainsAllKeywordsPredicate.java b/src/main/java/unicash/model/transaction/predicates/TransactionContainsAllKeywordsPredicate.java index 4119e26fa40..9b3bba91bbc 100644 --- a/src/main/java/unicash/model/transaction/predicates/TransactionContainsAllKeywordsPredicate.java +++ b/src/main/java/unicash/model/transaction/predicates/TransactionContainsAllKeywordsPredicate.java @@ -24,7 +24,7 @@ public class TransactionContainsAllKeywordsPredicate public static final String EMPTY_STRING = ""; public static final List EMPTY_STRING_LIST = List.of(EMPTY_STRING); - public HashMap + private HashMap predicatePairMap = new HashMap<>(); /**