DataValue#

class pyopenms.DataValue(value=None)#

Bases: object

Wrapper around OpenMS::DataValue, stored as a Python object internally.

__init__(value=None)#

Methods

__init__([value])

isEmpty()

Return True if the value is empty.

toBool()

Return value as bool.

toDouble()

Return value as float.

toDoubleList()

Return value as list of floats.

toInt()

Return value as int.

toIntList()

Return value as list of ints.

toString()

Return value as string.

toStringList()

Return value as list of strings.

valueType()

Return the type of the stored value.

Attributes

DOUBLE_LIST = 5#
DOUBLE_VALUE = 2#
EMPTY_VALUE = 6#
INT_LIST = 4#
INT_VALUE = 1#
STRING_LIST = 3#
STRING_VALUE = 0#
isEmpty()#

Return True if the value is empty.

toBool()#

Return value as bool.

Same rule as C++ DataValue::toBool(): exactly ‘true’ or ‘false’, nothing else.

toDouble()#

Return value as float.

toDoubleList()#

Return value as list of floats.

toInt()#

Return value as int.

toIntList()#

Return value as list of ints.

toString()#

Return value as string.

toStringList()#

Return value as list of strings.

valueType()#

Return the type of the stored value.