Class count

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

public class count extends PyIterator
See Also:
  • Field Details

  • Constructor Details

    • count

      public count(PyType subType)
    • count

      public count()
      Creates an iterator that returns consecutive numbers starting at 0.
    • count

      public count(PyObject start)
      Creates an iterator that returns consecutive numbers starting at start.
    • count

      public count(PyObject start, PyObject step)
      Creates an iterator that returns consecutive numbers starting at start with step step.
  • Method Details

    • count___copy__

      public PyObject count___copy__()
    • __reduce_ex__

      public PyObject __reduce_ex__(PyObject protocol)
    • __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