public static class NumberRange.IntRange extends NumberRange<Integer>
NumberRange.CommandFactory<T extends Number,R extends NumberRange<T>>, NumberRange.Factory<T extends Number,R extends NumberRange<T>>, NumberRange.FloatRange, NumberRange.IntRange
Modifier and Type | Field and Description |
---|---|
static NumberRange.IntRange |
ANY |
private Long |
maxSquared |
private Long |
minSquared |
EXCEPTION_EMPTY, EXCEPTION_SWAPPED, max, min
Modifier | Constructor and Description |
---|---|
private |
IntRange(Integer min,
Integer max) |
Modifier and Type | Method and Description |
---|---|
static NumberRange.IntRange |
atLeast(int value) |
static NumberRange.IntRange |
exactly(int value) |
static NumberRange.IntRange |
fromJson(JsonElement element) |
static NumberRange.IntRange |
fromStringReader(com.mojang.brigadier.StringReader reader,
Function<Integer,Integer> converter) |
static NumberRange.IntRange |
parse(com.mojang.brigadier.StringReader reader) |
private static NumberRange.IntRange |
parse(com.mojang.brigadier.StringReader reader,
Integer min,
Integer max) |
private static Long |
squared(Integer value) |
boolean |
test(int value) |
public static final NumberRange.IntRange ANY
private final Long minSquared
private final Long maxSquared
private static NumberRange.IntRange parse(com.mojang.brigadier.StringReader reader, @Nullable Integer min, @Nullable Integer max) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public static NumberRange.IntRange exactly(int value)
public static NumberRange.IntRange atLeast(int value)
public boolean test(int value)
public static NumberRange.IntRange fromJson(@Nullable JsonElement element)
public static NumberRange.IntRange parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public static NumberRange.IntRange fromStringReader(com.mojang.brigadier.StringReader reader, Function<Integer,Integer> converter)