Package org.webharvest.runtime.variables
Class Variable
- java.lang.Object
-
- org.webharvest.runtime.variables.Variable
-
- Direct Known Subclasses:
EmptyVariable
,ListVariable
,NodeVariable
public abstract class Variable extends Object
Variables Interface.
-
-
Constructor Summary
Constructors Constructor Description Variable()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Object
getWrappedObject()
abstract boolean
isEmpty()
Object[]
toArray()
Safely converts this variable to array of objects.abstract byte[]
toBinary()
abstract byte[]
toBinary(String charset)
boolean
toBoolean()
Safely converts this variable to boolean value.double
toDouble()
Safely converts this variable to double value.int
toInt()
Safely converts this variable to integer value.abstract Iterator
toIterator()
abstract List<Variable>
toList()
long
toLong()
Safely converts this variable to long value.abstract String
toString()
abstract String
toString(String charset)
-
-
-
Method Detail
-
toBinary
public abstract byte[] toBinary()
-
toBinary
public abstract byte[] toBinary(String charset)
-
isEmpty
public abstract boolean isEmpty()
-
getWrappedObject
public abstract Object getWrappedObject()
-
toBoolean
public boolean toBoolean()
Safely converts this variable to boolean value.- Returns:
- boolean value
-
toInt
public int toInt()
Safely converts this variable to integer value.- Returns:
- int value
-
toLong
public long toLong()
Safely converts this variable to long value.- Returns:
- long value
-
toDouble
public double toDouble()
Safely converts this variable to double value.- Returns:
- double value
-
toArray
public Object[] toArray()
Safely converts this variable to array of objects.- Returns:
- array of objects
-
toIterator
public abstract Iterator toIterator()
-
-