Get rid of a few ide warnings
This commit is contained in:
parent
160a82adb7
commit
b864824308
5 changed files with 5 additions and 24 deletions
|
|
@ -74,7 +74,6 @@ public class BoundedInteger implements Parser<Integer> {
|
|||
* @param max maximum size of the integer
|
||||
* @return the {@link BoundedInteger}
|
||||
*/
|
||||
|
||||
public static BoundedInteger between(int min, int max) {
|
||||
return new BoundedInteger(min, max);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package de.plugh.compositeparse.parsers;
|
||||
|
||||
import de.plugh.compositeparse.Block;
|
||||
import de.plugh.compositeparse.ParseException;
|
||||
import de.plugh.compositeparse.Parser;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -31,7 +30,7 @@ public class Constant<T> implements Parser<T> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public T read(Block block) throws ParseException {
|
||||
public T read(Block block) {
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import de.plugh.compositeparse.ParseException;
|
|||
import de.plugh.compositeparse.Parser;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
|
|
@ -29,9 +30,7 @@ public class Decision<T> implements Parser<T> {
|
|||
@SafeVarargs
|
||||
public Decision(Pair<Parser<?>, Parser<T>>... pairs) {
|
||||
this.pairs = new ArrayList<>();
|
||||
for (Pair<Parser<?>, Parser<T>> pair : pairs) {
|
||||
this.pairs.add(pair);
|
||||
}
|
||||
Collections.addAll(this.pairs, pairs);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -17,21 +17,6 @@ import java.util.function.Function;
|
|||
*/
|
||||
public class Literal<T> implements Parser<T> {
|
||||
|
||||
/**
|
||||
* A single space {@code " "}
|
||||
*/
|
||||
public static final Literal<Void> SPACE = new Literal<>(" ");
|
||||
|
||||
/**
|
||||
* A single comma {@code ","}
|
||||
*/
|
||||
public static final Literal<Void> COMMA = new Literal<>(",");
|
||||
|
||||
/**
|
||||
* A single semicolon {@code ";"}
|
||||
*/
|
||||
public static final Literal<Void> SEMICOLON = new Literal<>(";");
|
||||
|
||||
private final String literal;
|
||||
private final T value;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import de.plugh.compositeparse.ParseException;
|
|||
import de.plugh.compositeparse.Parser;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
|
|
@ -25,9 +26,7 @@ public class Options<T> implements Parser<T> {
|
|||
@SafeVarargs
|
||||
public Options(Parser<T>... parsers) {
|
||||
this.parsers = new ArrayList<>();
|
||||
for (Parser<T> parser : parsers) {
|
||||
this.parsers.add(parser);
|
||||
}
|
||||
Collections.addAll(this.parsers, parsers);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue