com.dooapp.gaedo.blueprints.queries.tests.NotVertexTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gaedo-blueprints Show documentation
Show all versions of gaedo-blueprints Show documentation
Implementation of gaedo mechanisms backed by blueprints graph layer
package com.dooapp.gaedo.blueprints.queries.tests;
import com.dooapp.gaedo.blueprints.GraphDatabaseDriver;
import com.dooapp.gaedo.blueprints.strategies.GraphMappingStrategy;
import com.dooapp.gaedo.properties.Property;
import com.tinkerpop.blueprints.Vertex;
/**
* A not is just the opposite of an or : if or returns true, not return false
* @author ndx
*
*/
public class NotVertexTest extends AndVertexTest implements VertexTest, CompoundVertexTest {
public NotVertexTest(GraphMappingStrategy> strategy, GraphDatabaseDriver driver, Iterable p) {
super(strategy, driver, p);
}
@Override
public boolean matches(Vertex examined) {
return !super.matches(examined);
}
@Override
public void accept(VertexTestVisitor visitor) {
if(visitor.startVisit(this)) {
for(VertexTest v : tests) {
v.accept(visitor);
}
}
visitor.endVisit(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy