Sha256: a135a3acb756b110280f08afad9fe867d2a9a4666a9c1bf0cb1dcfd7cb6e6622

Contents?: true

Size: 603 Bytes

Versions: 15

Compression:

Stored size: 603 Bytes

Contents

module Pacer::Pipes
  class IdCollectionFilterPipe < RubyPipe
    def initialize(ids, comparison)
      super()
      @ids = Set[*ids]
      @comparison = comparison
    end

    def processNextStart
      if @comparison == Pacer::Pipes::EQUAL
        while true
          element = @starts.next
          if element and @ids.include? element.getId
            return element
          end
        end
      else
        while true
          element = @starts.next
          if element and not @ids.include? element.getId
            return element
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
pacer-1.4.2-java lib/pacer/pipe/id_collection_filter_pipe.rb
pacer-1.4.1-java lib/pacer/pipe/id_collection_filter_pipe.rb
pacer-1.4.0-java lib/pacer/pipe/id_collection_filter_pipe.rb
pacer-1.3.5-java lib/pacer/pipe/id_collection_filter_pipe.rb
pacer-1.3.4-java lib/pacer/pipe/id_collection_filter_pipe.rb
pacer-1.3.3-java lib/pacer/pipe/id_collection_filter_pipe.rb
pacer-1.3.2-java lib/pacer/pipe/id_collection_filter_pipe.rb
pacer-1.3.1-java lib/pacer/pipe/id_collection_filter_pipe.rb
pacer-1.2.0-java lib/pacer/pipe/id_collection_filter_pipe.rb
pacer-1.1.1-java lib/pacer/pipe/id_collection_filter_pipe.rb
pacer-1.1.0-java lib/pacer/pipe/id_collection_filter_pipe.rb
pacer-1.0.3-java lib/pacer/pipe/id_collection_filter_pipe.rb
pacer-1.0.2-java lib/pacer/pipe/id_collection_filter_pipe.rb
pacer-1.0.1-java lib/pacer/pipe/id_collection_filter_pipe.rb
pacer-1.0.0-java lib/pacer/pipe/id_collection_filter_pipe.rb