Table of Contents

Class SetGenerator<T>

Namespace
Hegel
Assembly
Hegel.dll

Draws sets of distinct values from an element generator.

public sealed class SetGenerator<T> : PrintableGenerator<HashSet<T>>

Type Parameters

T
Inheritance
SetGenerator<T>
Inherited Members

Properties

Label

The span label the engine files this generator's draws under. Defaults to a label derived from the class's full name.

public override ulong Label { get; }

Property Value

ulong

Methods

DoDraw(TestCase)

Draw one value. Called inside a span labelled Label: draw from another generator through DrawSilent<T>(Generator<T>), which opens its span, rather than by calling its hook.

protected override HashSet<T> DoDraw(TestCase tc)

Parameters

tc TestCase

Returns

HashSet<T>

DoDrawAndPrint(TestCase, Printer)

Draw one value, printing it to printer (which may be Noop). Draw its parts through DrawAndPrint<T>(Generator<T>, Printer).

protected override HashSet<T> DoDrawAndPrint(TestCase tc, Printer printer)

Parameters

tc TestCase
printer Printer

Returns

HashSet<T>

MaxSize(int)

At most maxSize elements.

public SetGenerator<T> MaxSize(int maxSize)

Parameters

maxSize int

Returns

SetGenerator<T>

MinSize(int)

At least minSize elements.

public SetGenerator<T> MinSize(int minSize)

Parameters

minSize int

Returns

SetGenerator<T>