class PIM::ItemsWithPostExhaustionDeadline::EnumerableAsIterator

Minimal Java-shaped iterator over a Ruby Enumerable (test / non-Java items).

Public Class Methods

new(enumerable) click to toggle source
# File exporter.rb, line 126
def initialize(enumerable)
  @enum = enumerable.to_enum
  prefetch
end

Public Instance Methods

hasNext() click to toggle source
# File exporter.rb, line 131
def hasNext
  @has_next
end
next() click to toggle source
# File exporter.rb, line 135
def next
  raise java.util.NoSuchElementException.new unless @has_next
  value = @next
  prefetch
  value
end
remove() click to toggle source
# File exporter.rb, line 142
def remove
  raise java.lang.UnsupportedOperationException.new
end