UniqueIdInterface#
- class pyopenms.UniqueIdInterface#
Bases:
objectA base class defining a common interface for all classes having a unique id
- __init__() None#
- __init__(arg: pyopenms.UniqueIdInterface, /) None
Methods
__init__()Clear the unique id.
Assigns a valid unique id, but only if the present one is invalid.
Returns the unique id
Returns whether the unique id is invalid.
Returns whether the unique id is valid.
isValid(unique_id)Returns true if the unique_id is valid, false otherwise
setUniqueId(rhs)Assigns a new, valid unique id.
- clearUniqueId() int#
Clear the unique id. The new unique id will be invalid. Returns 1 if the unique id was changed, 0 otherwise
- ensureUniqueId() int#
Assigns a valid unique id, but only if the present one is invalid. Returns 1 if the unique id was changed, 0 otherwise
- getUniqueId() int#
Returns the unique id
- hasInvalidUniqueId() int#
Returns whether the unique id is invalid. Returns 1 if the unique id is invalid, 0 otherwise
- hasValidUniqueId() int#
Returns whether the unique id is valid. Returns 1 if the unique id is valid, 0 otherwise
- static isValid(unique_id: int) bool#
Returns true if the unique_id is valid, false otherwise
- setUniqueId(rhs: int) None#
- setUniqueId(rhs: str) None
Assigns a new, valid unique id. Always returns 1