Code example for Set

Methods: size

     * @return the next item in the iteration 
    public PyObject next() { 
        PyObject o = this.__iternext__();
        if (o == null) {
            if (this._count != this._set.size()) {
                // CPython throws an exception even if you have iterated through the 
                // entire set, this is not true for Java, so check by hand 
                throw Py.RuntimeError("dictionary changed size during iteration"); 
            throw Py.StopIteration(""); 
        return o;
     * Returns the next item in the iteration. 
     * @return the next item in the iteration 
     *         or null to signal the end of the iteration 
Contextual code suggestions in your IDE  Get Codota for Java