Sha256: eda083999f6243907be1c853b83aa64556b2fb3033791e8de1bfd3ffadcac09b
Contents?: true
Size: 854 Bytes
Versions: 11
Compression:
Stored size: 854 Bytes
Contents
package com.xnlogic.pacer.pipes; import java.util.Collection; import java.util.HashSet; import java.util.Set; import com.tinkerpop.blueprints.Edge; import com.tinkerpop.pipes.AbstractPipe; public class LabelCollectionFilterPipe extends AbstractPipe<Edge, Edge> { private Set<String> labels; public LabelCollectionFilterPipe(final Collection<String> labels) { if (labels instanceof Set) { this.labels = (Set<String>)labels; } else { this.labels = new HashSet<String>(); if(labels != null){ this.labels.addAll(labels); } } } protected Edge processNextStart() { while (true) { Edge edge = this.starts.next(); if (edge != null && this.labels.contains(edge.getLabel())) { return edge; } } } }
Version data entries
11 entries across 11 versions & 1 rubygems