Class AbstractMutableJythonSequence
java.lang.Object
org.python.core.PyObject
org.python.core.PySequence
com.inductiveautomation.ignition.common.script.abc.AbstractJythonSequence
com.inductiveautomation.ignition.common.script.abc.AbstractMutableJythonSequence
- All Implemented Interfaces:
- JythonSequence,- MutableJythonSequence,- Serializable
- Direct Known Subclasses:
- PropertyTreeScriptWrapper.ArrayWrapper
public abstract class AbstractMutableJythonSequence
extends AbstractJythonSequence
implements MutableJythonSequence
Base class to pretend to be a Jython "sequence", aka a Pythonic list. Should support slicing and, if applicable,
 sorting. If you don't want to implement a method, leave it a no-op but add 
PyIgnoreMethodTag to the
 throws declaration, which will prevent it from being exposed to Jython.- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class org.python.core.PySequenceorg.python.core.PySequence.DefaultIndexDelegateNested classes/interfaces inherited from class org.python.core.PyObjectorg.python.core.PyObject.ConversionException
- 
Field SummaryFields inherited from class org.python.core.PySequencedelegatorFields inherited from class org.python.core.PyObjectattributes, gcMonitorGlobal, objtype, TYPE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionorg.python.core.PyObject__imul__(org.python.core.PyObject other) Deliberately stubbed - override if you want to implement the (uncommon)__imul__operator.abstract voidappend(org.python.core.PyObject element) Addselementto the end of the sequence.protected voiddelslice(int start, int stop, int step, int n) Deliberately stubbed - override if you want to implement slice deletion, a fairly uncommon Python operation:abstract voidextend(org.python.core.PyObject sequence) Adds all elements fromsequenceto the end of the sequence.abstract 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.abstract org.python.core.PyObjectpop(int index) Pops the element atindexoff the sequence and returns it.protected abstract voidpyset(int index, org.python.core.PyObject value) abstract voidremove(org.python.core.PyObject element) Removeselementfrom the sequence, if it exists.protected voidsetslice(int start, int stop, int step, org.python.core.PyObject value) Deliberately stubbed - override if you want to implement slice assignment, a fairly uncommon Python operation:voidDeliberately stubbed - override if you want to implement in-place sorting.Methods inherited from class com.inductiveautomation.ignition.common.script.abc.AbstractJythonSequence__add__, __mul__, __repr__, __rmul__, __str__, getslice, isMappingType, isNumberType, isSequenceType, pyget, repeat, sublist, toStringMethods inherited from class org.python.core.PySequence__delitem__, __delslice__, __eq__, __finditem__, __finditem__, __ge__, __getitem__, __getslice__, __gt__, __iter__, __le__, __lt__, __ne__, __nonzero__, __setitem__, __setitem__, __setslice__, __tojava__, boundToSequence, cmp, del, delRange, fastSequence, isSubType, runsupportedopMessage, sliceLength, unsupportedopMessageMethods inherited from class org.python.core.PyObject__abs__, __and__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __cmp__, __coerce__, __coerce_ex__, __complex__, __contains__, __delattr__, __delattr__, __delete__, __delitem__, __delslice__, __dir__, __div__, __divmod__, __ensure_finalizer__, __findattr__, __findattr__, __findattr_ex__, __finditem__, __float__, __floordiv__, __format__, __get__, __getattr__, __getattr__, __getitem__, __getnewargs__, __getslice__, __hash__, __hex__, __iadd__, __iand__, __idiv__, __idivmod__, __ifloordiv__, __ilshift__, __imod__, __index__, __int__, __invert__, __ior__, __ipow__, __irshift__, __isub__, __iternext__, __itruediv__, __ixor__, __len__, __long__, __lshift__, __mod__, __neg__, __not__, __oct__, __or__, __pos__, __pow__, __pow__, __radd__, __rand__, __rawdir__, __rdiv__, __rdivmod__, __reduce__, __reduce_ex__, __reduce_ex__, __rfloordiv__, __rlshift__, __rmod__, __ror__, __rpow__, __rrshift__, __rshift__, __rsub__, __rtruediv__, __rxor__, __set__, __setattr__, __setattr__, __setitem__, __setslice__, __sub__, __truediv__, __trunc__, __unicode__, __xor__, _add, _and, _callextra, _cmp, _div, _divmod, _doget, _doget, _doset, _eq, _floordiv, _ge, _gt, _iadd, _iand, _idiv, _idivmod, _ifloordiv, _ilshift, _imod, _imul, _in, _ior, _ipow, _irshift, _is, _isnot, _isub, _itruediv, _ixor, _jcall, _jcallexc, _jthrow, _le, _lshift, _lt, _mod, _mul, _ne, _notin, _or, _pow, _rshift, _sub, _truediv, _unsupportedop, _xor, adaptToCoerceTuple, asDouble, asIndex, asIndex, asInt, asInt, asIterable, asLong, asLong, asName, asName, asString, asString, asStringOrNull, asStringOrNull, bit_length, conjugate, delDict, delType, dispatch__init__, equals, fastGetClass, fastGetDict, finalize, getDict, getJavaProxy, getType, hashCode, impAttr, implementsDescrDelete, implementsDescrGet, implementsDescrSet, invoke, invoke, invoke, invoke, invoke, invoke, isCallable, isDataDescr, isIndex, isInteger, mergeClassDict, mergeDictAttr, mergeListAttr, noAttributeError, object___subclasshook__, readonlyAttributeError, setDict, setTypeMethods inherited from interface com.inductiveautomation.ignition.common.script.abc.JythonSequence__contains__, __iter__, __len__, __mul__, __repr__, __rmul__, count, indexMethods inherited from interface com.inductiveautomation.ignition.common.script.abc.MutableJythonSequence__add__
- 
Constructor Details- 
AbstractMutableJythonSequence- Parameters:
- clazz- A reference to your implementing class - can't use getClass since the type is used in some Jython reflection stuff that happens on initialization.
 
 
- 
- 
Method Details- 
appendpublic abstract void append(org.python.core.PyObject element) Description copied from interface:MutableJythonSequenceAddselementto the end of the sequence.- Specified by:
- appendin interface- MutableJythonSequence
 
- 
extendpublic abstract void extend(org.python.core.PyObject sequence) Description copied from interface:MutableJythonSequenceAdds all elements fromsequenceto the end of the sequence.- Specified by:
- extendin interface- MutableJythonSequence
 
- 
removepublic abstract void remove(org.python.core.PyObject element) throws org.python.core.PyException Description copied from interface:MutableJythonSequenceRemoveselementfrom the sequence, if it exists.- Specified by:
- removein interface- MutableJythonSequence
- Throws:
- org.python.core.PyException-- Py.ValueErrorif the element is not in the sequence.
 
- 
poppublic org.python.core.PyObject pop() throws org.python.core.PyExceptionDescription copied from interface:MutableJythonSequencePops the last element off the sequence and returns it.- Specified by:
- popin interface- MutableJythonSequence
- Throws:
- org.python.core.PyException-- Py.IndexErrorif the sequence is empty.
 
- 
poppublic abstract org.python.core.PyObject pop(int index) throws org.python.core.PyException Description copied from interface:MutableJythonSequencePops the element atindexoff the sequence and returns it. Should support negative values forindex, to indicate offset from the end of the sequence.- Specified by:
- popin interface- MutableJythonSequence
- Throws:
- org.python.core.PyException-- Py.IndexErrorif the index is not in range.
 
- 
pysetprotected abstract void pyset(int index, org.python.core.PyObject value) - Overrides:
- pysetin class- org.python.core.PySequence
 
- 
insertpublic abstract void insert(int index, org.python.core.PyObject element) Description copied from interface:MutableJythonSequenceAddselementto sequence at positionindex.- Specified by:
- insertin interface- MutableJythonSequence
 
- 
setsliceprotected void setslice(int start, int stop, int step, org.python.core.PyObject value) throws org.python.core.PyIgnoreMethodTag Deliberately stubbed - override if you want to implement slice assignment, a fairly uncommon Python operation:l = ['a', 'b', 'c', 'd'] l[1:2] = (2, 3) print l >>> ['a', 2, 3, 'd']- Overrides:
- setslicein class- org.python.core.PySequence
- Throws:
- org.python.core.PyIgnoreMethodTag- marker exception to prevent this method from being visible in Jython code.
 
- 
delsliceprotected void delslice(int start, int stop, int step, int n) throws org.python.core.PyIgnoreMethodTag Deliberately stubbed - override if you want to implement slice deletion, a fairly uncommon Python operation:l = ['a', 'b', 'c', 'd'] del l[1:2] print l >>> ['a', 'd']- Overrides:
- delslicein class- org.python.core.PySequence
- Throws:
- org.python.core.PyIgnoreMethodTag- marker exception to prevent this method from being visible in Jython code.
 
- 
__imul__public org.python.core.PyObject __imul__(org.python.core.PyObject other) throws org.python.core.PyIgnoreMethodTag Deliberately stubbed - override if you want to implement the (uncommon)__imul__operator.l = ['a', 'b', 'c', 'd'] l *= 2 print l >>> ['a', 'b', 'c', 'd', 'a', 'b', 'c', 'd']- Specified by:
- __imul__in interface- MutableJythonSequence
- Overrides:
- __imul__in class- org.python.core.PyObject
- Returns:
- the result of the mul, or nullif this operation is not defined
- Throws:
- org.python.core.PyIgnoreMethodTag- marker exception to prevent this method from being visible in Jython code.
 
- 
sortpublic void sort(org.python.core.PyObject[] args, String[] keywords) throws org.python.core.PyIgnoreMethodTag Deliberately stubbed - override if you want to implement in-place sorting.l = ['a', 'b', 'c', 'd'] l.sort(reverse=True) print l >>> ['d', 'c', 'b', 'a']- Specified by:
- sortin interface- MutableJythonSequence
- Throws:
- org.python.core.PyIgnoreMethodTag- marker exception to prevent this method from being visible in Jython code.
 
 
-