package org.neo4j.util;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

import org.neo4j.api.core.Relationship;
import org.neo4j.api.core.RelationshipType;
import org.neo4j.api.core.ReturnableEvaluator;
import org.neo4j.api.core.TraversalPosition;

public class OneOfRelTypesReturnableEvaluator implements ReturnableEvaluator
{
	private Set<RelationshipType> types;
	
	public OneOfRelTypesReturnableEvaluator( RelationshipType... types )
	{
		this.types = new HashSet<RelationshipType>( Arrays.asList( types ) );
	}
	
	public boolean isReturnableNode( TraversalPosition currentPos )
	{
		Relationship rel = currentPos.lastRelationshipTraversed();
		return rel != null && this.types.contains( rel.getType() );
	}
}

@@ -361,32 +361,22 @@
 ate Set%3C
-RelationshipType
+String
 %3E types;
@@ -478,32 +478,210 @@
 HashSet%3C
-RelationshipType
+String%3E();%0A%09%09for ( RelationshipType type : types )%0A%09%09%7B%0A%09%09%09this.types.add( type.name() );%0A%09%09%7D%0A%09%7D%0A%09%0A%09public OneOfRelTypesReturnableEvaluator( String... names )%0A%09%7B%0A%09%09this.types = new HashSet%3CString
 %3E( Array
@@ -690,19 +690,19 @@
 asList( 
-typ
+nam
 es ) );%0A
@@ -835,16 +835,16 @@
 rsed();%0A
-
 %09%09return
@@ -893,16 +893,23 @@
 etType()
+.name()
  );%0A%09%7D%0A%7D

The equality of two RelationshipType instances is the name, not the RelationshipType#equals