Package org.qdl_lang.variables.values
Class QDLValue
- java.lang.Object
- 
- org.qdl_lang.variables.values.QDLValue
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<QDLValue>,- Constants
 - Direct Known Subclasses:
- AllIndicesValue,- AxisRestrictionValue,- BooleanValue,- DecimalValue,- DyadicFunctionReferenceValue,- FunctionReferenceValue,- ModuleValue,- QDLKey,- QDLNullValue,- SetValue
 
 public class QDLValue extends Object implements Constants, Serializable, Comparable<QDLValue> The top-level wrapper class for every value QDL knows about.- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected AxisExpressionaxisValueprotected BooleanbooleanValueprotected BigDecimaldecimalValueprotected DyadicFunctionReferenceNodedyadicFunctionValueprotected FunctionReferenceNodefunctionValueprotected LonglongValueprotected ModulemoduleValueprotected QDLNullnullValueprotected QDLSetsetValueprotected QDLStemstemValueprotected StringstringValue- 
Fields inherited from interface org.qdl_lang.variables.ConstantsALL_INDICES_NAME, ALL_INDICES_TYPE, ARG_COUNT_TYPE, AXIS_RESTRICTION_NAME, AXIS_RESTRICTION_TYPE, BOOLEAN_NAME, BOOLEAN_TYPE, DECIMAL_NAME, DECIMAL_TYPE, DYADIC_FUNCTION_NAME, DYADIC_FUNCTION_TYPE, FUNCTION_NAME, FUNCTION_TYPE, INTEGER_TYPE, LIST_NAME, LIST_TYPE, LONG_NAME, LONG_TYPE, MODULE_NAME, MODULE_TYPE, NULL_NAME, NULL_TYPE, SET_NAME, SET_TYPE, STEM_NAME, STEM_TYPE, STRING_NAME, STRING_TYPE, UNKNOWN_NAME, UNKNOWN_TYPE
 
- 
 - 
Method Summary
 
- 
- 
- 
Field Detail- 
longValueprotected Long longValue 
 - 
booleanValueprotected Boolean booleanValue 
 - 
decimalValueprotected BigDecimal decimalValue 
 - 
stringValueprotected String stringValue 
 - 
moduleValueprotected Module moduleValue 
 - 
functionValueprotected FunctionReferenceNode functionValue 
 - 
dyadicFunctionValueprotected DyadicFunctionReferenceNode dyadicFunctionValue 
 - 
axisValueprotected AxisExpression axisValue 
 - 
setValueprotected QDLSet setValue 
 - 
stemValueprotected QDLStem stemValue 
 - 
nullValueprotected QDLNull nullValue 
 
- 
 - 
Constructor Detail- 
QDLValuepublic QDLValue(Object value) 
 
- 
 - 
Method Detail- 
getValuepublic Object getValue() 
 - 
setValuepublic void setValue(Object value) 
 - 
hasValuepublic boolean hasValue() 
 - 
getTypepublic int getType() 
 - 
isAxisRestrictionpublic boolean isAxisRestriction() 
 - 
isBooleanpublic boolean isBoolean() 
 - 
isDecimalpublic boolean isDecimal() 
 - 
isDyadicFunctionpublic boolean isDyadicFunction() 
 - 
isFunctionpublic boolean isFunction() 
 - 
isListpublic boolean isList() 
 - 
isListOrStempublic boolean isListOrStem() 
 - 
isLongpublic boolean isLong() 
 - 
isModulepublic boolean isModule() 
 - 
isNullpublic boolean isNull() 
 - 
isSetpublic boolean isSet() 
 - 
isStempublic boolean isStem() 
 - 
isStringpublic boolean isString() 
 - 
isAllIndicespublic boolean isAllIndices() 
 - 
asBooleanpublic Boolean asBoolean() 
 - 
asDecimalpublic BigDecimal asDecimal() 
 - 
asStempublic QDLStem asStem() 
 - 
asStringpublic String asString() 
 - 
asNullpublic QDLNull asNull() 
 - 
asSetpublic QDLSet asSet() 
 - 
asModulepublic Module asModule() 
 - 
asLongpublic Long asLong() 
 - 
asFunctionpublic FunctionReferenceNode asFunction() 
 - 
asDyadicFunctionpublic DyadicFunctionReferenceNode asDyadicFunction() 
 - 
asAxisExpressionpublic AxisExpression asAxisExpression() 
 - 
getInputFormpublic String getInputForm() 
 - 
getNullValuepublic static QDLNullValue getNullValue() 
 - 
asQDLValuepublic static QDLValue asQDLValue(Object value) Factory method to convert an object to aQDLValueif it is not one.- Parameters:
- value-
- Returns:
 
 - 
asJavaValuepublic static Object asJavaValue(Object value) effectively the inverse ofasQDLValue(Object). If this isQDLValueit will unwrap the value, otherwise it just returns the argument.- Parameters:
- value-
- Returns:
 
 - 
castToJavaValuespublic static List<Object> castToJavaValues(List<QDLValue> values) Utility to convert a collection ofQDLValues to their Java objects.- Parameters:
- values-
- Returns:
 
 - 
castToQDLValuespublic static List<QDLValue> castToQDLValues(List<Object> values) Inverse cast ofcastToJavaValues(List). This takes a collection of java values and turns it into a list ofQDLValues- Parameters:
- values-
- Returns:
 
 - 
castToQDLValuespublic static Collection<QDLValue> castToQDLValues(Collection<Object> values) 
 - 
compareTopublic int compareTo(QDLValue qdlValue) - Specified by:
- compareToin interface- Comparable<QDLValue>
 
 - 
isScalarpublic boolean isScalar() 
 
- 
 
-