Class repeat

All Implemented Interfaces:
Serializable, Iterable<Object>, Traverseproc
Direct Known Subclasses:
repeatDerived

public class repeat extends PyIterator
See Also:
  • Field Details

  • Constructor Details

    • repeat

      public repeat()
    • repeat

      public repeat(PyType subType)
    • repeat

      public repeat(PyObject object)
    • repeat

      public repeat(PyObject object, int times)
  • Method Details

    • __len__

      public int __len__()
      Description copied from class: PyObject
      Equivalent to the standard Python __len__ method. Part of the mapping discipline.
      Overrides:
      __len__ in class PyObject
      Returns:
      the length of the object
    • __repr__

      public PyString __repr__()
      Description copied from class: PyObject
      Equivalent to the standard Python __repr__ method. Each sub-class of PyObject is likely to re-define this method to provide for its own reproduction.
      Overrides:
      __repr__ in class PyObject
    • __iternext__

      public PyObject __iternext__()
      Description copied from class: PyObject
      Return the next element of the sequence that this is an iterator for. Returns null when the end of the sequence is reached.
      Specified by:
      __iternext__ in class PyIterator
    • next

      public PyObject next()
      Description copied from class: PyIterator
      The exposed next method. Note that exposed derivable subclasses of PyIterator should override next to call doNext(custom___iternext__), as __iternext__ is overridden by the Derived classes.
      Overrides:
      next in class PyIterator
      Returns:
      a PyObject result
    • traverse

      public int traverse(Visitproc visit, Object arg)
      Description copied from interface: Traverseproc
      Traverses all directly contained PyObjects. Like in CPython, arg must be passed unmodified to visit as its second parameter. If Visitproc.visit(PyObject, Object) returns nonzero, this return value must be returned immediately by traverse. Visitproc.visit(PyObject, Object) must not be called with a null PyObject-argument.
      Specified by:
      traverse in interface Traverseproc
      Overrides:
      traverse in class PyIterator
    • refersDirectlyTo

      public boolean refersDirectlyTo(PyObject ob)
      Description copied from interface: Traverseproc
      Optional operation. Should only be implemented if it is more efficient than calling Traverseproc.traverse(Visitproc, Object) with a visitproc that just watches out for ob. Must return false if ob is null.
      Specified by:
      refersDirectlyTo in interface Traverseproc
      Overrides:
      refersDirectlyTo in class PyIterator