@Test public void testClone() { final AggregationPipelineQueryNode base = new AggregationPipelineQueryNode( collection, new LinkedList<>(), Sets.newHashSet("x", "y"), Sets.newHashSet("x", "y", "opt"), HashBiMap.create()); final AggregationPipelineQueryNode copy = base.clone(); Assert.assertEquals(base, copy); copy.getPipeline().add(new Document("$project", new Document())); Assert.assertNotEquals(base, copy); base.getPipeline().add(new Document("$project", new Document())); Assert.assertEquals(base, copy); }
@Override public AggregationPipelineQueryNode clone() { return new AggregationPipelineQueryNode(collection, new LinkedList<>(pipeline), new HashSet<>(assuredBindingNames), new HashSet<>(bindingNames), HashBiMap.create(varToOriginalName)); }
AggregationPipelineQueryNode extends ExternalSet { @Override public AggregationPipelineQueryNode clone() { return new AggregationPipelineQueryNode(collection, new LinkedList<>(pipeline), new HashSet<>(assuredBindingNames), new HashSet<>(bindingNames), HashBiMap.create(varToOriginalName)); } }
AggregationPipelineQueryNode extends ExternalSet { @Override public AggregationPipelineQueryNode clone() { return new AggregationPipelineQueryNode(collection, new LinkedList<>(pipeline), new HashSet<>(assuredBindingNames), new HashSet<>(bindingNames), HashBiMap.create(varToOriginalName)); } AggregationPipelineQueryNode(final MongoCollection<Document> collection, final StatementPattern baseSP);   AggregationPipelineQueryNode(final MongoCollection<Document> collection,
            final List<Bson> pipeline, final Set<String> assuredBindingNames,
            final Set<String> bindingNames, final BiMap<String, String> varToOriginalName); }
AggregationPipelineQueryNode extends ExternalSet { @Override public AggregationPipelineQueryNode clone() { return new AggregationPipelineQueryNode(collection, new LinkedList<>(pipeline), new HashSet<>(assuredBindingNames), new HashSet<>(bindingNames), HashBiMap.create(varToOriginalName)); } AggregationPipelineQueryNode(final MongoCollection<Document> collection, final StatementPattern baseSP);   AggregationPipelineQueryNode(final MongoCollection<Document> collection,
            final List<Bson> pipeline, final Set<String> assuredBindingNames,
            final Set<String> bindingNames, final BiMap<String, String> varToOriginalName); @Override boolean equals(final Object o); @Override int hashCode(); @Override CloseableIteration<BindingSet, QueryEvaluationException> evaluate(final BindingSet bindings); @Override Set<String> getAssuredBindingNames(); @Override Set<String> getBindingNames(); @Override AggregationPipelineQueryNode clone(); @Override String getSignature(); boolean joinWith(final StatementPattern sp); boolean project(final Iterable<ProjectionElemList> projections); boolean extend(final Iterable<ExtensionElem> extensionElements); boolean filter(final ValueExpr condition); boolean distinct(); void requireSourceDerivationDepth(final int requiredLevel); void requireSourceTimestamp(final long t); List<Bson> getTriplePipeline(final long timestamp, final boolean requireNew); }
AggregationPipelineQueryNode extends ExternalSet { @Override public AggregationPipelineQueryNode clone() { return new AggregationPipelineQueryNode(collection, new LinkedList<>(pipeline), new HashSet<>(assuredBindingNames), new HashSet<>(bindingNames), HashBiMap.create(varToOriginalName)); } AggregationPipelineQueryNode(final MongoCollection<Document> collection, final StatementPattern baseSP);   AggregationPipelineQueryNode(final MongoCollection<Document> collection,
            final List<Bson> pipeline, final Set<String> assuredBindingNames,
            final Set<String> bindingNames, final BiMap<String, String> varToOriginalName); @Override boolean equals(final Object o); @Override int hashCode(); @Override CloseableIteration<BindingSet, QueryEvaluationException> evaluate(final BindingSet bindings); @Override Set<String> getAssuredBindingNames(); @Override Set<String> getBindingNames(); @Override AggregationPipelineQueryNode clone(); @Override String getSignature(); boolean joinWith(final StatementPattern sp); boolean project(final Iterable<ProjectionElemList> projections); boolean extend(final Iterable<ExtensionElem> extensionElements); boolean filter(final ValueExpr condition); boolean distinct(); void requireSourceDerivationDepth(final int requiredLevel); void requireSourceTimestamp(final long t); List<Bson> getTriplePipeline(final long timestamp, final boolean requireNew);  }