|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.sposh.elements.Result
public class Result
Class representing value and its properties in posh plan. Value in plan can
be e.g boolean or string and they have some properties. Methods of this class
take an object and perform some test on it (e.g. if you pass Double
with value 0.0 to isFalse(java.lang.Object)
, it will return true).
Most important part of this class are methods compare(java.lang.Object, java.lang.Object)
and equal(java.lang.Object, java.lang.Object)
.
Field Summary | |
---|---|
static String |
variableNameRegexp
Regexp for parameter name be same as |
Constructor Summary | |
---|---|
Result()
|
Method Summary | |
---|---|
static int |
compare(Object operand1,
Object operand2)
What is the comparison of operand1 and operand2? |
static boolean |
equal(Object operand1,
Object operand2)
Are two operands equal? Comparison is based on rules outlines in http://docs.python.org/reference/expressions.html#notin |
static boolean |
getBoolean(Object value)
Get boolean value from Boolean class. |
static Number |
getNumber(Object value)
|
static double |
getNumerical(Object value)
Get numerical representation for object derived from class Number
and from Boolean (true = 1, false = 0) |
static boolean |
isBoolean(Object value)
Is value instance of Boolean class? |
static boolean |
isFalse(Object value)
Is the value false? null is false Boolean false is false Number 0 is false Arrays of size 0 is false, otherwise value is true |
static boolean |
isNumber(Object value)
|
static boolean |
isNumerical(Object value)
Is value numerical(either number or boolean)? |
static boolean |
isTrue(Object value)
Is value true? Basically negate isFalse(java.lang.Object) . |
static boolean |
isVariableName(String possibleVariableName)
Check if passed string is variable name. |
static Object |
parseValue(String valueString)
Parse string from posh plan and convert it to object. |
static String |
toLap(Object value)
Get string representation of the value that can be used in the lap plan. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String variableNameRegexp
Constructor Detail |
---|
public Result()
Method Detail |
---|
public static boolean isFalse(Object value)
http://docs.python.org/library/stdtypes.html#truth-value-testing
public static boolean isTrue(Object value)
isFalse(java.lang.Object)
.
value
- value for which we want the information.public static boolean isNumber(Object value)
public static Number getNumber(Object value)
public static boolean isBoolean(Object value)
Boolean
class?
value
- value to be tested
Boolean
public static boolean getBoolean(Object value)
Boolean
class.
value
- (value must be instance of {@link Boolean) class.
public static Object parseValue(String valueString) throws ParseException
valueString
- string that will be parsed to object NOT NULL.
ParseException
public static double getNumerical(Object value)
Number
and from Boolean
(true = 1, false = 0)
value
-
public static boolean isNumerical(Object value)
value
- value to check if it is numericalpublic static boolean equal(Object operand1, Object operand2)
operand1
- operand2
-
public static int compare(Object operand1, Object operand2)
operand1
- operand2
-
public static String toLap(Object value)
parseValue(java.lang.String)
.
value
- value to convret
public static boolean isVariableName(String possibleVariableName)
possibleVariableName
- Tested string.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |