Interface MutableJythonSequence
-
- All Superinterfaces:
JythonSequence
- All Known Implementing Classes:
AbstractMutableJythonSequence
,PropertyTreeScriptWrapper.ArrayWrapper
public interface MutableJythonSequence extends JythonSequence
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.python.core.PyObject
__add__(org.python.core.PyObject other)
Override to allow adding another sequence to this one, using the bare+
operator.org.python.core.PyObject
__imul__(org.python.core.PyObject other)
Override to allow extending.void
append(org.python.core.PyObject element)
Addselement
to the end of the sequence.void
extend(org.python.core.PyObject sequence)
Adds all elements fromsequence
to the end of the sequence.void
insert(int index, org.python.core.PyObject element)
Addselement
to sequence at positionindex
.org.python.core.PyObject
pop()
Pops the last element off the sequence and returns it.org.python.core.PyObject
pop(int index)
Pops the element atindex
off the sequence and returns it.void
remove(org.python.core.PyObject element)
Removeselement
from the sequence, if it exists.void
sort(org.python.core.PyObject[] args, java.lang.String[] keywords)
Sorts this list in place.-
Methods inherited from interface com.inductiveautomation.ignition.common.script.abc.JythonSequence
__contains__, __iter__, __len__, __mul__, __repr__, __rmul__, count, index
-
-
-
-
Method Detail
-
append
void append(org.python.core.PyObject element)
Addselement
to the end of the sequence.
-
extend
void extend(org.python.core.PyObject sequence)
Adds all elements fromsequence
to the end of the sequence.
-
remove
void remove(org.python.core.PyObject element) throws org.python.core.PyException
Removeselement
from the sequence, if it exists.- Throws:
org.python.core.PyException
-Py.ValueError
if the element is not in the sequence.
-
pop
org.python.core.PyObject pop(int index) throws org.python.core.PyException
Pops the element atindex
off the sequence and returns it. Should support negative values forindex
, to indicate offset from the end of the sequence.- Throws:
org.python.core.PyException
-Py.IndexError
if the index is not in range.
-
pop
org.python.core.PyObject pop() throws org.python.core.PyException
Pops the last element off the sequence and returns it.- Throws:
org.python.core.PyException
-Py.IndexError
if the sequence is empty.
-
insert
void insert(int index, org.python.core.PyObject element)
Addselement
to sequence at positionindex
.
-
__add__
org.python.core.PyObject __add__(org.python.core.PyObject other)
Override to allow adding another sequence to this one, using the bare+
operator. Should return this sequence, with the additional elements fromother
added to the end.- Returns:
- the result of the mul, or
null
if this operation is not defined
-
__imul__
org.python.core.PyObject __imul__(org.python.core.PyObject other)
Override to allow extending. This is distinct fromJythonSequence.__mul__(org.python.core.PyObject)
in that__imul__
is called during a multiplicative assignment expression, iex *= 3
.- Returns:
- the result of the mul, or
null
if this operation is not defined
-
sort
void sort(org.python.core.PyObject[] args, java.lang.String[] keywords)
Sorts this list in place. Can be passed with any combination (including none) of two arguments:key
: a key extraction function, which will be called per element of this sequence and should return whatever value should be use for comparison.reverse
: a boolean indicating that the results should be sorted in descending, rather than ascending, order.
-
-