Skip to content

Commit

Permalink
Merge pull request #259 from kaiwen98/master
Browse files Browse the repository at this point in the history
removed print messages
  • Loading branch information
kaiwen98 authored Nov 6, 2020
2 parents 093de10 + aaefc9d commit d8a18e3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
1 change: 1 addition & 0 deletions data/backup/names.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ christmas




8 changes: 0 additions & 8 deletions src/main/java/seedu/financeit/parser/ParamsParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,18 @@ public static ParamsParser getInstance() {
public String getSeparator(String input) {
//Matcher matches <space><separator><paramType><space>, so (matched index + 1) gives the separator
int separatorIndex = matcher.start() + 1;
System.out.println(input.charAt(separatorIndex));
return String.valueOf(input.charAt(separatorIndex));
}

public String getNextParamType(String input) {
System.out.println("input1: " + input);
//Matcher gives index of space before the param, so (matched index + 1) gives the separator
int separatorIndex = -1;
try {
separatorIndex = RegexMatcher.paramMatcher(input).start();
System.out.println("proces: " + input + ", " + separatorIndex);
} catch (IllegalStateException e) {
return input;
}
int nextSpaceIndex = input.indexOf(" ", separatorIndex + 1);
System.out.println("output: " + input.substring(separatorIndex, nextSpaceIndex));
return input.substring(separatorIndex, nextSpaceIndex);
}

Expand All @@ -61,11 +57,9 @@ public HashMap<String, String> parseParams(String paramSubstring) {
String[] buffer;
String paramArgument = "";
boolean paramArgumentExist;
System.out.println("input: " + paramSubstring);
do {
paramSubstring += " ";
paramArgument = "";
System.out.println("paramsubs: " + paramSubstring);
//Separate into [paramType, rest of string]
buffer = paramSubstring.split(" ", 2);

Expand Down Expand Up @@ -106,8 +100,6 @@ public HashMap<String, String> parseParams(String paramSubstring) {
String separator = getNextParamType(paramSubstring);
buffer = paramSubstring.split(separator, 2);
buffer[1] = separator + buffer[1];
System.out.println("buffer0: " + buffer[0]);
System.out.println("buffer1: " + buffer[1]);

paramArgument = buffer[0].trim();
paramSubstring = buffer[1].trim();
Expand Down

0 comments on commit d8a18e3

Please sign in to comment.