Class FractionAdapter
GSON TypeAdapter for Apache Commons Math Fraction Object.
- Author:
- bramp
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a FractionAdapter with default zero values for edge cases. -
Method Summary
Modifier and TypeMethodDescriptionread(JsonReader reader) voidwrite(JsonWriter writer, Fraction value) Methods inherited from class com.google.gson.TypeAdapter
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
-
Constructor Details
-
FractionAdapter
public FractionAdapter()Constructs a FractionAdapter with default zero values for edge cases.
-
-
Method Details
-
read
- Specified by:
readin classTypeAdapter<Fraction>- Throws:
IOException
-
write
- Specified by:
writein classTypeAdapter<Fraction>- Throws:
IOException
-