Sha256: 6f10bb28809a1221a4c9eb8a14a7d06d600f58fd45be93841138c6aef7be652f

Contents?: true

Size: 827 Bytes

Versions: 33

Compression:

Stored size: 827 Bytes

Contents

module Pacer
  module Routes::RouteOperations
    def fast_group_count(hash_map = nil)
      chain_route :side_effect => :group_count, :hash_map => hash_map
    end
  end

  module SideEffect
    module GroupCount
      def hash_map=(hash_map)
        @hash_map = hash_map
      end

      def at_least(n)
        @min = n
        self
      end

      def to_h
        h = {}
        min = @min || 0
        cap.first.each do |k,v|
          h[k] = v if v >= min
        end
        h
      end

      protected

      def attach_pipe(end_pipe)
        if @hash_map
          @pipe = com.tinkerpop.pipes.sideeffect.GroupCountPipe.new @hash_map
        else
          @pipe = com.tinkerpop.pipes.sideeffect.GroupCountPipe.new
        end
        @pipe.set_starts(end_pipe) if end_pipe
        @pipe
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

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