code: def next(self):
          
          result = javabridge.call(
              self.loader.jobject, "getNextInstance",
              "(Lweka/core/Instances;)Lweka/core/Instance;", self.structure.jobject)
          if result is None:
              raise StopIteration()
          else:
              return Instance(result)
docs: Reads the next dataset row.
  
          :return: the next row
          :rtype: Instance