Class NonnegativeIntJsonParser
java.lang.Object
org.woftnw.eof.io.parse.common.number.NonnegativeIntJsonParser
- All Implemented Interfaces:
NumberJsonParser<Integer>, JsonParser<Integer>
Parses a nonnegative integer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparse(@NonNull com.google.gson.JsonElement element, ElytrasOfFire plugin) Parse a givenJsonElement.
-
Constructor Details
-
NonnegativeIntJsonParser
public NonnegativeIntJsonParser()
-
-
Method Details
-
parse
public Integer parse(@NonNull com.google.gson.JsonElement element, ElytrasOfFire plugin) throws EoFNumberValueJsonParseException, UnsupportedOperationException Description copied from interface:JsonParserParse a givenJsonElement.- Specified by:
parsein interfaceJsonParser<Integer>- Specified by:
parsein interfaceNumberJsonParser<Integer>- Parameters:
element- The element to parse and validate.plugin- The Elytras of Fire plugin instance.- Returns:
- The parsed and validated object.
- Throws:
EoFNumberValueJsonParseExceptionUnsupportedOperationException
-