Skip to content

Commit a6d2152

Browse files
removed ParseUtil class
1 parent 13ab710 commit a6d2152

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

src/main/java/com/datasiqn/commandcore/argument/type/BoolArgumentType.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.datasiqn.commandcore.argument.type;
22

33
import com.datasiqn.commandcore.command.CommandContext;
4-
import com.datasiqn.commandcore.util.ParseUtil;
54
import com.datasiqn.resultapi.None;
65
import com.datasiqn.resultapi.Result;
76
import org.jetbrains.annotations.NotNull;
@@ -17,7 +16,9 @@ class BoolArgumentType implements SimpleArgumentType<Boolean> {
1716

1817
@Override
1918
public @NotNull Result<Boolean, None> parseWord(@NotNull String word) {
20-
return Result.resolve(() -> ParseUtil.strictParseBoolean(word));
19+
if (word.equalsIgnoreCase("true")) return Result.ok(true);
20+
else if (word.equalsIgnoreCase("false")) return Result.ok(false);
21+
return Result.error();
2122
}
2223

2324
@Override

src/main/java/com/datasiqn/commandcore/util/ParseUtil.java

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)