Sha256: 162b55c14e3b760d3b9f716641cbc419edcb908c8f121782ad94179cc7959714

Contents?: true

Size: 556 Bytes

Versions: 26

Compression:

Stored size: 556 Bytes

Contents

module Neo4j
  module Traversal
    class FilterPredicate # :nodoc:
      include org.neo4j.helpers.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

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
neo4j-2.0.0.alpha.5-java lib/neo4j/traversal/filter_predicate.rb
neo4j-2.0.0.alpha.4-java lib/neo4j/traversal/filter_predicate.rb
neo4j-2.0.0.alpha.3-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.3.1-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.3.0-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.2.6-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.2.5-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.2.4-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.2.3-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.2.2-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.2.1-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.2.0-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.1.4-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.1.3-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.1.2-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.1.1-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.1.0-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.1.0.beta.3-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.1.0.beta.2-java lib/neo4j/traversal/filter_predicate.rb
neo4j-1.1.0.beta.1-java lib/neo4j/traversal/filter_predicate.rb