telepath / com.github.giedomak.telepath.datamodels.graph / PathStream

PathStream

class PathStream : Iterable<Path> (source)

Data class for holding streams of paths where we abstract away the materializing into the MemoryManager.

Constructors

<init>

PathStream(telepath: Telepath?, _paths: Stream<Path>, materialize: Boolean = true)

Data class for holding streams of paths where we abstract away the materializing into the MemoryManager.

Properties

materialize

val materialize: Boolean

Boolean indicating if the given stream has to be materialized.

pathSupplier

val pathSupplier: Supplier<Stream<Path>>

paths

val paths: Stream<Path>

Stream of paths. This acts as a Supplier if the paths are materialized.

Functions

ensureMaterialization

fun ensureMaterialization(): PathStream

Materialize the stream if we don't have a memoryManagerId yet.

iterator

fun iterator(): Iterator<Path>