GeneratorBuilderImpl

portals.api.builder.GeneratorBuilderImpl
class GeneratorBuilderImpl(name: String)(using bctx: ApplicationBuilderContext) extends GeneratorBuilder

Internal API. Implementation of the generator.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def fromIterator[T](it: Iterator[T]): AtomicGeneratorRef[T]

Create a generator from an iterator of events.

Create a generator from an iterator of events.

This creates a single atom from the events of the iterator with type T.

Type parameters

T

The type of the generated events.

Value parameters

it

The iterator of events.

Attributes

Returns

A reference to the generator.

Example
builder.generators.fromIterator(Iterator(1, 2, 3))
Definition Classes
override def fromIterator[T](it: Iterator[T], keys: Iterator[Key]): AtomicGeneratorRef[T]

Create a generator from an iterator of events with keys specified by the keys iterator.

Create a generator from an iterator of events with keys specified by the keys iterator.

This creates a single atom from the events of the iterator with type T. The keys of the events are specified by the keys iterator. The iterators should be of the same length.

Type parameters

T

The type of the generated events.

Value parameters

it

The iterator of events.

keys

The iterator of keys.

Attributes

Returns

A reference to the generator.

Example
builder.generators.fromIterator(Iterator(1, 2, 3), Iterator(4, 5, 6))
Definition Classes
override def fromIteratorOfIterators[T](itit: Iterator[Iterator[T]]): AtomicGeneratorRef[T]

Create a generator from an iterator of iterators of events.

Create a generator from an iterator of iterators of events.

This creates a new atom for each inner iterator that is returned by the outer iterator. The type of the events is T.

Type parameters

T

The type of the generated events.

Value parameters

itit

The iterator of iterators of events.

Attributes

Returns

A reference to the generator.

Example
// Creates two atoms: Atom(1, 2, 3) and Atom(4, 5, 6)
builder.generators.fromIteratorOfIterators(Iterator(Iterator(1, 2, 3), Iterator(4, 5, 6)))
Definition Classes
override def fromIteratorOfIterators[T](itit: Iterator[Iterator[T]], keys: Iterator[Iterator[Key]]): AtomicGeneratorRef[T]

Create a generator from an iterator of iterators of events with keys specified by the keys iterator.

Create a generator from an iterator of iterators of events with keys specified by the keys iterator.

This creates a new atom for each inner iterator that is returned by the outer iterator. The type of the events is T. The keys of the events are specified by the keys iterator. The iterators should be of the same length.

Type parameters

T

The type of the generated events.

Value parameters

itit

The iterator of iterators of events.

keys

The iterator of iterators of keys.

Attributes

Returns

A reference to the generator.

Example
// Creates two atoms: Atom(1, 2, 3) and Atom(4, 5, 6)
// with keys (7, 8, 9) and (10, 11, 12)
builder.generators.fromIteratorOfIterators(
 Iterator(Iterator(1, 2, 3), Iterator(4, 5, 6)),
 Iterator(Iterator(7, 8, 9), Iterator(10, 11, 12))
)
Definition Classes
override def fromList[T](list: List[T]): AtomicGeneratorRef[T]

Create a generator from a list of events.

Create a generator from a list of events.

This creates a single atom from the events of the list with type T.

Type parameters

T

The type of the generated events.

Value parameters

list

The list of events.

Attributes

Returns

A reference to the generator.

Example
builder.generators.fromList(List(1, 2, 3))
Definition Classes
override def fromList[T](list: List[T], keys: List[Key]): AtomicGeneratorRef[T]

Create a generator from a list of events with keys specified by the keys list.

Create a generator from a list of events with keys specified by the keys list.

This creates a single atom from the events of the list with type T. The keys of the events are specified by the keys list. The lists should be of the same length.

Type parameters

T

The type of the generated events.

Value parameters

keys

The list of keys.

list

The list of events.

Attributes

Returns

A reference to the generator.

Example
// Creates a single atom: Atom(1, 2, 3) with keys (4, 5, 6)
builder.generators.fromList(List(1, 2, 3), List(4, 5, 6))
Definition Classes
override def fromListOfLists[T](listlist: List[List[T]]): AtomicGeneratorRef[T]

Create a generator from a list of lists of events.

Create a generator from a list of lists of events.

This creates a new atom for each inner list that is returned by the outer list. The type of the events is T.

Type parameters

T

The type of the generated events.

Value parameters

listlist

The list of lists of events.

Attributes

Returns

A reference to the created generator.

Example
// Creates two atoms: Atom(1, 2, 3) and Atom(4, 5, 6)
builder.generators.fromListOfLists(List(List(1, 2, 3), List(4, 5, 6)))
Definition Classes
override def fromListOfLists[T](listlist: List[List[T]], keys: List[List[Key]]): AtomicGeneratorRef[T]

Create a generator from a list of lists of events, together with a list of lists of keys.

Create a generator from a list of lists of events, together with a list of lists of keys.

This creates a new atom for each inner list that is returned by the outer list. The type of the events is T. The keys of the events are specified by the keys list. The lists should be of the same length.

Attributes

Example
// Creates two atoms: Atom(1, 2, 3) and Atom(4, 5, 6)
// with keys (7, 8, 9) and (10, 11, 12)
builder.generators.fromListOfLists(
 List(List(1, 2, 3), List(4, 5, 6)),
 List(List(7, 8, 9), List(10, 11, 12))
)
Definition Classes
override def fromRange(start: Int, end: Int, step: Int): AtomicGeneratorRef[Int]

Create a generator from a range of integers which are grouped into step sized atoms.

Create a generator from a range of integers which are grouped into step sized atoms.

This creates atoms of size step with sequentially increasing integers. The sequence starts at start and ends at end - 1.

Value parameters

end

The end of the range (not inclusive).

start

The start of the range.

Attributes

Returns

A reference to the generator.

Example
// Creates the following atoms: Atom(1, 2), Atom(3, 4), Atom(5, 6), Seal
builder.generators.fromRange(1, 7, 2)
Definition Classes
override def generator[T](g: Generator[T]): AtomicGeneratorRef[T]

Internal API. Create a generator from a generator implementation.

Internal API. Create a generator from a generator implementation.

Attributes

Definition Classes