- java.lang.Object
-
- org.mal_lang.langspec.ttc.TtcExpression
-
- Direct Known Subclasses:
TtcBinaryOperation,TtcFunction,TtcNumber
public abstract class TtcExpression extends Object
Immutable class representing a TTC expression in a MAL language.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description TtcExpression()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static TtcExpressionfromJson(JsonObject jsonTtcExpression)Creates a newTtcExpressionfrom aJsonObject.doublegetMeanProbability()Returns the mean probability of thisTtcExpressionobject.doublegetMeanTtc()Returns the mean TTC of thisTtcExpressionobject.abstract JsonObjecttoJson()Returns the JSON representation of thisTtcExpressionobject.
-
-
-
Method Detail
-
getMeanTtc
public double getMeanTtc()
Returns the mean TTC of thisTtcExpressionobject.- Returns:
- the mean TTC of this
TtcExpressionobject - Throws:
UnsupportedOperationException- if thisTtcExpressiondoes not support mean TTC- Since:
- 1.0.0
-
getMeanProbability
public double getMeanProbability()
Returns the mean probability of thisTtcExpressionobject.- Returns:
- the mean probability of this
TtcExpressionobject - Throws:
UnsupportedOperationException- if thisTtcExpressiondoes not support mean probability- Since:
- 1.0.0
-
toJson
public abstract JsonObject toJson()
Returns the JSON representation of thisTtcExpressionobject.- Returns:
- the JSON representation of this
TtcExpressionobject - Since:
- 1.0.0
-
fromJson
public static TtcExpression fromJson(JsonObject jsonTtcExpression)
Creates a newTtcExpressionfrom aJsonObject.- Parameters:
jsonTtcExpression- theJsonObject- Returns:
- a new
TtcExpression - Throws:
NullPointerException- ifjsonTtcExpressionisnull- Since:
- 1.0.0
-
-