Sha256: 7b11562d005f1d9c35e3ede15e5cfb3d763a58cc58d19f30524f7fb4c7fc1e57

Contents?: true

Size: 858 Bytes

Versions: 22

Compression:

Stored size: 858 Bytes

Contents

module Pacer::Pipes
  class PropertyComparisonFilterPipe < RubyPipe
    def initialize(left, right, filter)
      super()
      @filter = filter
      @left = left.to_s
      @right = right.to_s
    end

    protected

    def processNextStart
      while true
        obj = @starts.next
        l = obj.getProperty(@left)
        r = obj.getProperty(@right)
        case @filter
        when Compare::EQUAL
          return obj if l == r
        when Compare::NOT_EQUAL
          return obj if l != r
        when Compare::GREATER_THAN
          return obj if l and r and l > r
        when Compare::LESS_THAN
          return obj if l and r and l < r
        when Compare::GREATER_THAN_EQUAL
          return obj if l and r and l >= r
        when Compare::LESS_THAN_EQUAL
          return obj if l and r and l <= r
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
pacer-2.0.24-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.22-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.20-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.19-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.18-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.17-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.16-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.15-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.14-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.13-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.12-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.10-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.10.pre-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.8-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.6-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.4.pre-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-2.0.0.pre-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-1.6.0-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-1.5.4-java lib/pacer/pipe/property_comparison_pipe.rb
pacer-1.5.3-java lib/pacer/pipe/property_comparison_pipe.rb