Skip to content

Instantly share code, notes, and snippets.

@okram
Created July 30, 2014 20:16
Show Gist options
  • Save okram/2d610cc30731d926ff98 to your computer and use it in GitHub Desktop.
Save okram/2d610cc30731d926ff98 to your computer and use it in GitHub Desktop.
public default <E2> GraphTraversal<S, E2> keep(final String... asLabels) {
return asLabels.length == 1 ?
(GraphTraversal) this.addStep(new KeepOneStep<E2>(this, asLabels[0])) :
(GraphTraversal) this.addStep(new KeepManyStep<Map<String, E2>>(this, asLabels));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment