Class RangeJsonParser
java.lang.Object
org.woftnw.eof.io.parse.common.number.range.RangeJsonParser
- All Implemented Interfaces:
JsonParser<int[]>
- Direct Known Subclasses:
NegativeToNegativeJsonParser, NegativeToNonpositiveJsonParser, NonnegativeToNonnegativeJsonParser, NonnegativeToPositiveJsonParser, NonpositiveToNonnegativeJsonParser, PositiveToPositiveJsonParser
Parses a JSON range object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract NumberJsonParser<Integer> Get the parser to use for the maximum number.protected abstract NumberJsonParser<Integer> Get the parser to use for the minimum number.int[]parse(@NonNull com.google.gson.JsonElement element, ElytrasOfFire plugin) Parse a givenJsonElement.
-
Constructor Details
-
RangeJsonParser
public RangeJsonParser()
-
-
Method Details
-
parse
public int[] parse(@NonNull com.google.gson.JsonElement element, ElytrasOfFire plugin) throws EoFWrappedJsonParseException, UnsupportedOperationException Description copied from interface:JsonParserParse a givenJsonElement.- Specified by:
parsein interfaceJsonParser<int[]>- Parameters:
element- The element to parse and validate.plugin- The Elytras of Fire plugin instance.- Returns:
- The parsed and validated object.
- Throws:
EoFWrappedJsonParseExceptionUnsupportedOperationException
-
getMinParser
Get the parser to use for the minimum number.- Returns:
- The
NumberJsonParserto use. - See Also:
-
getMaxParser
Get the parser to use for the maximum number.- Returns:
- The
NumberJsonParserto use. - See Also:
-