All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sk.nociar.jpacloner.graphs.Literal Maven / Gradle / Ivy

There is a newer version: 1.0.3
Show newest version
package sk.nociar.jpacloner.graphs;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

public class Literal extends GraphExplorer {
	private final String literal;

	public Literal(String literal) {
		this.literal = literal;
	}

	@Override
	public Set explore(Collection entities, EntityExplorer entityExplorer) {
		Set explored = new HashSet();
		for (Object entity : entities) {
			Collection value = entityExplorer.explore(entity, literal);
			if (value != null) {
				explored.addAll(value);
			}
		}
		return explored;
	}
}