Interface JythonSequence

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean __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 of element in sequence.
      int index​(org.python.core.PyObject element)
      Returns the position of the first occurrence of element in the sequence.
    • Method Detail

      • index

        int index​(org.python.core.PyObject element)
        Returns the position of the first occurrence of element in the sequence.
      • count

        org.python.core.PyInteger count​(org.python.core.PyObject element)
        Return occurrences of element 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]