add patch for negative infinity and infinity attributes causing disconnect

This commit is contained in:
Lemon
2018-07-21 21:34:34 +05:00
committed by GitHub
parent f0a9b6d747
commit 301c5b8da1
7 changed files with 422 additions and 0 deletions

View File

@ -0,0 +1,36 @@
package ca.momothereal.mojangson.value;
import ca.momothereal.mojangson.ex.MojangsonParseException;
/**
* Represents a value inside a compound or array.
* @param <T> The type of value this MojangsonValue holds
*/
public interface MojangsonValue<T> {
/**
* Writes the value to a StringBuilder buffer.
* @param builder The buffer to write to
*/
void write(StringBuilder builder);
/**
* Parses and updates the current value to the given string representation
* @param string The string representation of the value
* @throws MojangsonParseException if the given value cannot be parsed
*/
void read(String string) throws MojangsonParseException;
/**
* Gets the current literal value
* @return The current literal value of the MojangsonValue
*/
T getValue();
/**
* Gets the literal value's class
* @return The literal value's class
*/
Class getValueClass();
}