Package org.mozilla.zest.core.v1
Class ZestExpressionResponseTime
- java.lang.Object
-
- org.mozilla.zest.core.v1.ZestElement
-
- org.mozilla.zest.core.v1.ZestExpression
-
- org.mozilla.zest.core.v1.ZestExpressionResponseTime
-
- All Implemented Interfaces:
ZestExpressionElement
public class ZestExpressionResponseTime extends ZestExpression
The Class ZestExpressionResponseTime.
-
-
Field Summary
-
Fields inherited from class org.mozilla.zest.core.v1.ZestElement
JSON_ELEMENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description ZestExpressionResponseTime()Instantiates a new zest expression response time.ZestExpressionResponseTime(long time)Instantiates a new zest expression response time.ZestExpressionResponseTime(long time, boolean greaterThan)Constructs aZestExpressionResponseTimewith the given time and whether the response should be greater than the given time.ZestExpressionResponseTime(long time, boolean greaterThan, boolean inverse)Constructs aZestExpressionResponseTimewith the given time, whether the response should be greater than the given time, and with the given inverse state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZestExpressionResponseTimedeepCopy()Deep copy.longgetTimeInMs()Gets the time in ms.booleanisGreaterThan()Checks if is greater than.booleanisTrue(ZestRuntime runtime)the boolean value result of the expression without inverse flag.voidsetGreaterThan(boolean greaterThan)Sets the greater than.voidsetTimeInMs(long timeInMs)Sets the time in ms.StringtoString()-
Methods inherited from class org.mozilla.zest.core.v1.ZestExpression
evaluate, isInverse, isLeaf, setInverse
-
Methods inherited from class org.mozilla.zest.core.v1.ZestElement
getElementType, isSameSubclass, setElementType
-
-
-
-
Constructor Detail
-
ZestExpressionResponseTime
public ZestExpressionResponseTime()
Instantiates a new zest expression response time.
-
ZestExpressionResponseTime
public ZestExpressionResponseTime(long time)
Instantiates a new zest expression response time.- Parameters:
time- the time
-
ZestExpressionResponseTime
public ZestExpressionResponseTime(long time, boolean greaterThan)Constructs aZestExpressionResponseTimewith the given time and whether the response should be greater than the given time.- Parameters:
time- the time in milliseconds.greaterThan- if the response time should be greater than the given time.- Since:
- 0.14.0
-
ZestExpressionResponseTime
public ZestExpressionResponseTime(long time, boolean greaterThan, boolean inverse)Constructs aZestExpressionResponseTimewith the given time, whether the response should be greater than the given time, and with the given inverse state.- Parameters:
time- the time in milliseconds.greaterThan- if the response time should be greater than the given time.inverse- if the expression should be the inverse.- Since:
- 0.14.0
-
-
Method Detail
-
isTrue
public boolean isTrue(ZestRuntime runtime)
Description copied from interface:ZestExpressionElementthe boolean value result of the expression without inverse flag.- Parameters:
runtime- the runtime- Returns:
- the boolean value of the expression without inverse flag
-
isGreaterThan
public boolean isGreaterThan()
Checks if is greater than.- Returns:
- true, if is greater than
-
setGreaterThan
public void setGreaterThan(boolean greaterThan)
Sets the greater than.- Parameters:
greaterThan- the new greater than
-
getTimeInMs
public long getTimeInMs()
Gets the time in ms.- Returns:
- the time in ms
-
setTimeInMs
public void setTimeInMs(long timeInMs)
Sets the time in ms.- Parameters:
timeInMs- the new time in ms
-
deepCopy
public ZestExpressionResponseTime deepCopy()
Description copied from class:ZestElementDeep copy.- Specified by:
deepCopyin interfaceZestExpressionElement- Specified by:
deepCopyin classZestExpression- Returns:
- the zest element
- See Also:
ZestElement
-
-