Interface JythonSequence
- All Known Subinterfaces:
MutableJythonSequence
- All Known Implementing Classes:
AbstractJythonSequence
,AbstractMutableJythonSequence
,DatasetUtilities.PyDataSet
,DatasetUtilities.PyDataSet.PyRow
,PropertyTreeScriptWrapper.ArrayWrapper
,Results.PyWrapper
public interface JythonSequence
-
Method Summary
Modifier and TypeMethodDescriptionboolean
__contains__
(org.python.core.PyObject o) org.python.core.PyObject
__iter__()
Returns an iterator that will return all elements of this sequence.int
__len__()
org.python.core.PyObject
__mul__
(org.python.core.PyObject other) Override to allow this sequence to work with the*
operator.org.python.core.PyString
__repr__()
org.python.core.PyObject
__rmul__
(org.python.core.PyObject other) Override to allow extending.org.python.core.PyInteger
count
(org.python.core.PyObject element) Return occurrences ofelement
in sequence.int
index
(org.python.core.PyObject element) Returns the position of the first occurrence ofelement
in the sequence.
-
Method Details
-
index
int index(org.python.core.PyObject element) Returns the position of the first occurrence ofelement
in the sequence. -
count
org.python.core.PyInteger count(org.python.core.PyObject element) Return occurrences ofelement
in sequence. -
__iter__
org.python.core.PyObject __iter__()Returns an iterator that will return all elements of this sequence. -
__contains__
boolean __contains__(org.python.core.PyObject o) - Returns:
true
if the underlying map has the requisite key
-
__len__
int __len__()- Returns:
- the length of this mapping.
-
__mul__
org.python.core.PyObject __mul__(org.python.core.PyObject other) Override to allow this sequence to work with the*
operator. Does not mutate this sequence.- Returns:
- the result of the mul, or
null
if this operation is not defined
-
__rmul__
org.python.core.PyObject __rmul__(org.python.core.PyObject other) Override to allow extending. This is distinct from__mul__(org.python.core.PyObject)
in that__rmul__
is called if the left operator in an multiplication expression doesn't support the given type - in that case, the right operator is given an opportunity to attempt the multiplication. Does not mutate this sequence.- Returns:
- the result of the mul, or
null
if this operation is not defined
-
__repr__
org.python.core.PyString __repr__()- Returns:
- a string containing a printable representation of this object. If practical, should match the evaluation
format of a Python list -
[item, item, item]
-