Package me.deecaad.core.file.serializers
Class ChanceSerializer
java.lang.Object
me.deecaad.core.file.serializers.ChanceSerializer
- All Implemented Interfaces:
Serializer<Double>,SimpleSerializer<Double>
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.deecaad.core.file.Serializer
canUsePathTo, getKeyword, getName, getParentKeywords, getWikiLink, letPassThrough, shouldSerialize, tryPathTo, useLaterMethods inherited from interface me.deecaad.core.file.SimpleSerializer
serialize
-
Constructor Details
-
ChanceSerializer
public ChanceSerializer()Default constructor for serializer.
-
-
Method Details
-
getTypeName
Description copied from interface:SimpleSerializerThe name of the type of the serializer. This is used for error messages.- Specified by:
getTypeNamein interfaceSimpleSerializer<Double>
-
deserialize
@NotNull public @NotNull Double deserialize(@NotNull @NotNull String value, @NotNull @NotNull String errorLocation) throws me.deecaad.core.file.SerializerException Description copied from interface:SimpleSerializerParses an object from a string.- Specified by:
deserializein interfaceSimpleSerializer<Double>- Parameters:
value- The string to parse.errorLocation- The location of the error in the file.- Returns:
- The parsed object.
- Throws:
me.deecaad.core.file.SerializerException
-
examples
Description copied from interface:SimpleSerializerReturns the set of all possible values that can be parsed by this serializer.The set of values will always be finite. Thus, any type that can take on an infinite number of values (like a
double) will return a finite set of example values.- Specified by:
examplesin interfaceSimpleSerializer<Double>- Returns:
- The set of all possible values that can be parsed by this serializer.
-