- java.lang.Object
-
- org.mal_lang.langspec.ttc.TtcExpression
-
- org.mal_lang.langspec.ttc.TtcNumber
-
public final class TtcNumber extends TtcExpression
Immutable class representing a TTC number in a MAL language.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description TtcNumber(double value)Constructs a newTtcNumberobject.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TtcNumberfromJson(JsonObject jsonTtcNumber)Creates a newTtcNumberfrom aJsonObject.doublegetMeanTtc()Returns the mean TTC of thisTtcExpressionobject.doublegetValue()Returns the value of thisTtcNumberobject.JsonObjecttoJson()Returns the JSON representation of thisTtcExpressionobject.-
Methods inherited from class org.mal_lang.langspec.ttc.TtcExpression
getMeanProbability
-
-
-
-
Method Detail
-
getValue
public double getValue()
Returns the value of thisTtcNumberobject.- Returns:
- the value of this
TtcNumberobject - Since:
- 1.0.0
-
getMeanTtc
public double getMeanTtc()
Description copied from class:TtcExpressionReturns the mean TTC of thisTtcExpressionobject.- Overrides:
getMeanTtcin classTtcExpression- Returns:
- the mean TTC of this
TtcExpressionobject
-
toJson
public JsonObject toJson()
Description copied from class:TtcExpressionReturns the JSON representation of thisTtcExpressionobject.- Specified by:
toJsonin classTtcExpression- Returns:
- the JSON representation of this
TtcExpressionobject
-
fromJson
public static TtcNumber fromJson(JsonObject jsonTtcNumber)
Creates a newTtcNumberfrom aJsonObject.- Parameters:
jsonTtcNumber- theJsonObject- Returns:
- a new
TtcNumber - Throws:
NullPointerException- ifjsonTtcNumberisnull- Since:
- 1.0.0
-
-