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.voidappend(org.python.core.PyObject element)Addselementto the end of the sequence.voidextend(org.python.core.PyObject sequence)Adds all elements fromsequenceto the end of the sequence.voidinsert(int index, org.python.core.PyObject element)Addselementto sequence at positionindex.org.python.core.PyObjectpop()Pops the last element off the sequence and returns it.org.python.core.PyObjectpop(int index)Pops the element atindexoff the sequence and returns it.voidremove(org.python.core.PyObject element)Removeselementfrom the sequence, if it exists.voidsort(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)
Addselementto the end of the sequence.
-
extend
void extend(org.python.core.PyObject sequence)
Adds all elements fromsequenceto the end of the sequence.
-
remove
void remove(org.python.core.PyObject element) throws org.python.core.PyExceptionRemoveselementfrom the sequence, if it exists.- Throws:
org.python.core.PyException-Py.ValueErrorif the element is not in the sequence.
-
pop
org.python.core.PyObject pop(int index) throws org.python.core.PyExceptionPops the element atindexoff 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.IndexErrorif the index is not in range.
-
pop
org.python.core.PyObject pop() throws org.python.core.PyExceptionPops the last element off the sequence and returns it.- Throws:
org.python.core.PyException-Py.IndexErrorif the sequence is empty.
-
insert
void insert(int index, org.python.core.PyObject element)Addselementto 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 fromotheradded to the end.- Returns:
- the result of the mul, or
nullif 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
nullif 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.
-
-