Skip to content

Commit d97479f

Browse files
committed
toStream for dsl
1 parent 0004dfa commit d97479f

File tree

1 file changed

+3
-1
lines changed
  • gremlin-scala/src/main/scala/gremlin/scala/dsl

1 file changed

+3
-1
lines changed

gremlin-scala/src/main/scala/gremlin/scala/dsl/Steps.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package gremlin.scala.dsl
33
import gremlin.scala._
44
import gremlin.scala.StepLabel.{combineLabelWithValue, GetLabelName}
55
import java.util.{Map => JMap}
6+
import java.util.stream.{Stream => JStream}
67
import scala.collection.mutable
78
import shapeless.{::, HList, HNil}
89
import shapeless.ops.hlist.{IsHCons, Mapper, Prepend, RightFolder, ToTraversable, Tupler}
@@ -21,13 +22,14 @@ trait StepsRoot {
2122
}
2223

2324
class Steps[EndDomain, EndGraph, Labels <: HList](val raw: GremlinScala[EndGraph])(
24-
implicit converter: Converter.Aux[EndDomain, EndGraph])
25+
implicit val converter: Converter.Aux[EndDomain, EndGraph])
2526
extends StepsRoot {
2627
type EndDomain0 = EndDomain
2728
type EndGraph0 = EndGraph
2829

2930
/* executes traversal and converts results into cpg domain type */
3031
def toList(): List[EndDomain] = raw.toList.map(converter.toDomain)
32+
def toStream(): JStream[EndDomain] = raw.toStream.map(converter.toDomain)
3133
def toSet(): Set[EndDomain] = raw.toSet.map(converter.toDomain)
3234
def iterate(): Unit = raw.iterate()
3335
def exec(): Unit = iterate

0 commit comments

Comments
 (0)