Skip to content

Commit

Permalink
Fix the FilterCommand Class
Browse files Browse the repository at this point in the history
  • Loading branch information
sp4ce-cowboy committed Oct 30, 2023
1 parent 02c43b9 commit d8cc6fe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/java/unicash/logic/commands/FilterCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import unicash.model.transaction.predicates.TransactionContainsAllKeywordsPredicate;

/**
* Filters the displayed Transactions according to certain parameters
* Filters the displayed Transactions according to certain parameters.
*/
public class FilterCommand extends Command {
public static final String COMMAND_WORD = "filter";
Expand All @@ -28,8 +28,9 @@ public class FilterCommand extends Command {
": Filters the transactions in UniCa$h "
+ "according to the specified properties"
+ "All properties must match in order for the transaction to be displayed."
+ "Any combination of any number of properties may be provided but at least "
+ "one property must be provided."
+ "Multiple keywords for the same property is allowed, except for Transaction"
+ "Type for which there can only be one keyword. A minimum of one keyword"
+ "must be provided."
)
.addParameter(PREFIX_NAME, "Name", true, true)
.addParameter(PREFIX_TYPE, "Type", true, false)
Expand All @@ -51,7 +52,7 @@ public class FilterCommand extends Command {
.build()
.toString();

public static final String MESSAGE_SUCCESS = "Filtered %1$s Transactions";
public static final String MESSAGE_SUCCESS = "Filtered %1$s Transactions!";

private final TransactionContainsAllKeywordsPredicate predicate;

Expand Down

0 comments on commit d8cc6fe

Please sign in to comment.