Package astra.lang
Class Functions
- java.lang.Object
-
- astra.core.Module
-
- astra.lang.Functions
-
public class Functions extends Module
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class astra.core.Module
Module.ACTION, Module.EVENT, Module.FORMULA, Module.SENSOR, Module.SUPPRESS_NOTIFICATIONS, Module.TERM
-
-
Constructor Summary
Constructors Constructor Description Functions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intarity(Funct f)Stringfunctor(Funct f)doublevalueAsDouble(Funct f, int index)Term that returns the value at the given index cast as an double.floatvalueAsFloat(Funct f, int index)Term that returns the value at the given index cast as an float.FunctvalueAsFunct(Funct f, int index)Term that returns the value at the given index cast as an long.intvalueAsInt(Funct f, int index)Term that returns the value at the given index cast as an int.ListTermvalueAsList(Funct f, int index)Term that returns the value at the given index cast as a list.longvalueAsLong(Funct f, int index)Term that returns the value at the given index cast as an long.StringvalueAsString(Funct f, int index)Term that returns the value at the given index cast as an string.
-
-
-
Method Detail
-
arity
public int arity(Funct f)
-
valueAsInt
public int valueAsInt(Funct f, int index)
Term that returns the value at the given index cast as an int.- Parameters:
f- the functional term containing the valueindex- the index of the value in the list- Returns:
- that value at the given index
-
valueAsLong
public long valueAsLong(Funct f, int index)
Term that returns the value at the given index cast as an long.- Parameters:
f- the functional term containing the valueindex- the index of the value in the list- Returns:
- that value at the given index
-
valueAsFunct
public Funct valueAsFunct(Funct f, int index)
Term that returns the value at the given index cast as an long.- Parameters:
f- the functional term containing the valueindex- the index of the value in the list- Returns:
- that value at the given index
-
valueAsDouble
public double valueAsDouble(Funct f, int index)
Term that returns the value at the given index cast as an double.- Parameters:
f- the functional term containing the valueindex- the index of the value in the list- Returns:
- that value at the given index
-
valueAsFloat
public float valueAsFloat(Funct f, int index)
Term that returns the value at the given index cast as an float.- Parameters:
f- the functional term containing the valueindex- the index of the value in the list- Returns:
- that value at the given index
-
valueAsList
public ListTerm valueAsList(Funct f, int index)
Term that returns the value at the given index cast as a list.- Parameters:
f- the functional term containing the valueindex- the index of the value in the list- Returns:
- that value at the given index
-
-