Sha256: 832ac884d17e1742fada5680e69e1521ae6a78e0e730fc136aac0df2f31cafc7

Contents?: true

Size: 398 Bytes

Versions: 26

Compression:

Stored size: 398 Bytes

Contents

module Pacer::Pipes
  class IsEmptyPipe < RubyPipe
    def initialize
      super
      @raise = false
    end

    def processNextStart
      raise EmptyPipe.instance if @raise
      starts.next
      @raise = true
    rescue EmptyPipe, java.util.NoSuchElementException
      true
    else
      raise EmptyPipe.instance
    end

    def reset
      @raise = false
      super()
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
pacer-2.0.10-java lib/pacer/pipe/is_empty_pipe.rb
pacer-2.0.10.pre-java lib/pacer/pipe/is_empty_pipe.rb
pacer-2.0.8-java lib/pacer/pipe/is_empty_pipe.rb
pacer-2.0.6-java lib/pacer/pipe/is_empty_pipe.rb
pacer-2.0.4.pre-java lib/pacer/pipe/is_empty_pipe.rb
pacer-2.0.0.pre-java lib/pacer/pipe/is_empty_pipe.rb
pacer-1.6.0-java lib/pacer/pipe/is_empty_pipe.rb
pacer-1.5.4-java lib/pacer/pipe/is_empty_pipe.rb
pacer-1.5.3-java lib/pacer/pipe/is_empty_pipe.rb
pacer-1.5.2-java lib/pacer/pipe/is_empty_pipe.rb
pacer-1.5.1-java lib/pacer/pipe/is_empty_pipe.rb
pacer-1.4.2-java lib/pacer/pipe/is_empty_pipe.rb
pacer-1.4.1-java lib/pacer/pipe/is_empty_pipe.rb
pacer-1.4.0-java lib/pacer/pipe/is_empty_pipe.rb
pacer-1.3.5-java lib/pacer/pipe/is_empty_pipe.rb
pacer-1.3.4-java lib/pacer/pipe/is_empty_pipe.rb
pacer-1.3.3-java lib/pacer/pipe/is_empty_pipe.rb
pacer-1.3.2-java lib/pacer/pipe/is_empty_pipe.rb
pacer-1.3.1-java lib/pacer/pipe/is_empty_pipe.rb
pacer-1.2.0-java lib/pacer/pipe/is_empty_pipe.rb