Skip to content

Commit e1c1230

Browse files
removed unnecessary qualifiers
1 parent c2a983d commit e1c1230

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main/java/com/datasiqn/commandcore/command/builder/BuilderCommand.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public BuilderCommand(@NotNull CommandBuilder commandBuilder, List<String> usage
6464
if (size >= 1) {
6565
if (nodes.isEmpty()) return Result.error(Collections.singletonList("Expected no parameters, but got parameters instead"));
6666

67-
BuilderCommand.CurrentNode current = findCurrentNode(reader);
67+
CurrentNode current = findCurrentNode(reader);
6868
Result<CommandNode<?>, List<String>> resultNode = current.node;
6969
if (resultNode.isError()) {
7070
if (current.extraInput) {
@@ -112,7 +112,7 @@ public BuilderCommand(@NotNull CommandBuilder commandBuilder, List<String> usage
112112
String matchingString = args.getString(args.size() - 1);
113113

114114
if (args.size() != 1) {
115-
BuilderCommand.CurrentNode current = findCurrentNode(reader);
115+
CurrentNode current = findCurrentNode(reader);
116116
List<CommandNode<?>> nodeList = current.nodes;
117117
if (nodeList.size() != 0) {
118118
CommandNode<?> node = nodeList.get(nodeList.size() - 1);
@@ -156,11 +156,11 @@ public boolean hasDescription() {
156156
}
157157

158158
@Contract("_, _ -> new")
159-
private @NotNull CommandContext buildContext(@NotNull CommandContext context, @NotNull BuilderCommand.CurrentNode result) {
159+
private @NotNull CommandContext buildContext(@NotNull CommandContext context, @NotNull CurrentNode result) {
160160
return CommandCore.createContext(context.getSource(), context.getCommand(), context.getLabel(), new ListArguments(result.args));
161161
}
162162

163-
private @NotNull Result<BuilderCommand.ApplicableNode, List<String>> checkApplicable(@NotNull ArgumentReader reader, @NotNull Set<CommandNode<?>> nodes) {
163+
private @NotNull Result<ApplicableNode, List<String>> checkApplicable(@NotNull ArgumentReader reader, @NotNull Set<CommandNode<?>> nodes) {
164164
List<CommandNode<?>> options = new ArrayList<>();
165165
List<String> exceptions = new ArrayList<>();
166166
if (reader.index() != 0) reader.next();
@@ -177,11 +177,11 @@ public boolean hasDescription() {
177177
String arg;
178178
if (reader.atEnd()) arg = reader.splice(beforeIndex);
179179
else arg = reader.splice(beforeIndex, reader.index());
180-
return Result.ok(new BuilderCommand.ApplicableNode(options.get(0), arg));
180+
return Result.ok(new ApplicableNode(options.get(0), arg));
181181
}
182182

183183
@Contract("_ -> new")
184-
private @NotNull BuilderCommand.CurrentNode findCurrentNode(@NotNull ArgumentReader reader) {
184+
private @NotNull CurrentNode findCurrentNode(@NotNull ArgumentReader reader) {
185185
Set<CommandNode<?>> nodeSet = nodes;
186186
List<String> args = new ArrayList<>();
187187
List<CommandNode<?>> nodeList = new ArrayList<>();
@@ -193,9 +193,9 @@ public boolean hasDescription() {
193193
System.out.println("errors: " + String.join(",", parseResult.unwrapError()));
194194
System.out.println("args is " + String.join(",", args));
195195
args.add(reader.splice(reader.index()));
196-
return new BuilderCommand.CurrentNode(Result.error(parseResult.unwrapError()), nodeList, args, false);
196+
return new CurrentNode(Result.error(parseResult.unwrapError()), nodeList, args, false);
197197
}
198-
BuilderCommand.ApplicableNode applicableNode = parseResult.unwrap();
198+
ApplicableNode applicableNode = parseResult.unwrap();
199199
node = applicableNode.node;
200200
nodeSet = node.getChildren();
201201
nodeList.add(node);
@@ -205,7 +205,7 @@ public boolean hasDescription() {
205205
}
206206
if (node == null) throw new IllegalArgumentException("reader must not be at end");
207207
System.out.println("args is " + String.join(",", args));
208-
return new BuilderCommand.CurrentNode(Result.ok(node), nodeList, args, false);
208+
return new CurrentNode(Result.ok(node), nodeList, args, false);
209209
}
210210

211211
private static class ApplicableNode {

0 commit comments

Comments
 (0)