Package com.hypixel.hytale.math.range
Class IntRangeBoundValidator
java.lang.Object
com.hypixel.hytale.math.range.IntRangeBoundValidator
- All Implemented Interfaces:
Validator<IntRange>,BiConsumer<IntRange,ValidationResults>
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateIntRangeBoundValidator(Integer min, Integer max, boolean inclusive, boolean lowerBound) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IntRange intRange, ValidationResults results) static IntRangeBoundValidatorlowerBound(Integer min, Integer max, boolean inclusive) voidupdateSchema(SchemaContext context, Schema target) private voidupdateSchemaBound(IntegerSchema integerSchema) static IntRangeBoundValidatorupperBound(Integer min, Integer max, boolean inclusive) private voidvalidateBound(int value, String boundName, ValidationResults results) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiConsumer
andThen
-
Field Details
-
min
-
max
-
inclusive
private final boolean inclusive -
lowerBound
private final boolean lowerBound
-
-
Constructor Details
-
IntRangeBoundValidator
-
-
Method Details
-
lowerBound
@Nonnull public static IntRangeBoundValidator lowerBound(Integer min, Integer max, boolean inclusive) -
upperBound
@Nonnull public static IntRangeBoundValidator upperBound(Integer min, Integer max, boolean inclusive) -
accept
- Specified by:
acceptin interfaceBiConsumer<IntRange,ValidationResults> - Specified by:
acceptin interfaceValidator<IntRange>
-
validateBound
-
updateSchema
- Specified by:
updateSchemain interfaceValidator<IntRange>
-
updateSchemaBound
-