Sha256: 3e1d8c3e5db9c771df3fab25f9d0a2cf3e19f6f65121a2c048b0ce704770f90e

Contents?: true

Size: 707 Bytes

Versions: 20

Compression:

Stored size: 707 Bytes

Contents

module Neo4j
  module Core
    module Traversal
      # Implements the Neo4j Predicate Java interface, only used internally.
      # @private
      class FilterPredicate
        include Java::OrgNeo4jHelpers::Predicate

        def initialize
          @procs = []
        end

        def add(proc)
          @procs << proc
        end

        def include_start_node
          @include_start_node = true
        end

        def accept(path)
          return false if @include_start_node && path.length == 0
          # find the first filter which returns false
          # if not found then we will accept this path
          @procs.find { |p| !p.call(path) }.nil?
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
neo4j-core-2.0.1-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-2.0.0-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-2.0.0.rc2-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-2.0.0.rc1-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-0.0.15-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-0.0.14-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-0.0.13-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-0.0.12-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-0.0.11-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-0.0.10-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-0.0.9-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-0.0.8-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-0.0.7-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-0.0.6-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-0.0.5-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-0.0.4-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-0.0.3-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-0.0.2-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-0.0.1-java lib/neo4j-core/traversal/filter_predicate.rb
neo4j-core-2.0.0.alpha.1-java lib/neo4j-core/traversal/filter_predicate.rb