vertx-pg-client.pg_iterator.rb Maven / Gradle / Ivy
require 'vertx/util/utils.rb'
# Generated from com.julienviet.pgclient.PgIterator
module VertxPgClient
# An iterator for processing postgres items synchronously.
class PgIterator
# @private
# @param j_del [::VertxPgClient::PgIterator] the java delegate
def initialize(j_del, j_arg_T=nil)
@j_del = j_del
@j_arg_T = j_arg_T != nil ? j_arg_T : ::Vertx::Util::unknown_type
end
# @private
# @return [::VertxPgClient::PgIterator] the underlying java delegate
def j_del
@j_del
end
# @return [true,false]
def has_next
if !block_given?
return @j_del.java_method(:hasNext, []).call()
end
raise ArgumentError, "Invalid arguments when calling has_next()"
end
# @return [Object]
def next
if !block_given?
return @j_arg_T.wrap(@j_del.java_method(:next, []).call())
end
raise ArgumentError, "Invalid arguments when calling next()"
end
end
end