org.apache.tinkerpop.gremlin.ogm.paths.steps.Step.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-gremlin-ogm Show documentation
Show all versions of kotlin-gremlin-ogm Show documentation
The Object Graph Mapping Library for Kotlin and Gremlin
package org.apache.tinkerpop.gremlin.ogm.paths.steps
import org.apache.tinkerpop.gremlin.ogm.paths.Path
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal
/**
* A [Step] defines a single manipulation to the underlying GraphTraversal.
*/
interface Step : Path {
override fun path() = listOf(this)
open class ToSingle(
private val step: (StepTraverser) -> GraphTraversal<*, TO>
) : Path.ToSingle, Step {
override fun invoke(from: StepTraverser): GraphTraversal<*, TO> = step(from)
}
open class ToOptional(
private val step: (StepTraverser) -> GraphTraversal<*, TO>
) : Path.ToOptional, Step {
override fun invoke(from: StepTraverser): GraphTraversal<*, TO> = step(from)
}
open class ToMany(
private val step: (StepTraverser) -> GraphTraversal<*, TO>
) : Path.ToMany, Step {
override fun invoke(from: StepTraverser): GraphTraversal<*, TO> = step(from)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy