### File

`src/builder/fieldset-builder.ts`

### Extends

`GroupBuilder`

### Index

###### Methods
Public addQuestion Public build

### Constructor

`constructor(code: string, description: string)`
Defined in src/builder/fieldset-builder.ts:6
Parameters :
Name | Type | Optional | Description
code | `string` |  |
description | `string` |  |

### Methods

Public addQuestion
`addQuestion(question: Question)`
Defined in src/builder/fieldset-builder.ts:16
Parameters :
Name | Type | Optional | Description
question | `Question<any>` |  |
Returns : `void`

Public build
`build()`
Defined in src/builder/fieldset-builder.ts:20
Returns : `Fieldset`

    import { GroupBuilder } from '.';
    import { Fieldset } from '../group';
    import { Question } from '../question';
    import { Validation } from '../validation';

    export class FieldsetBuilder extends GroupBuilder<Question<any>> {

      public constructor(
        code: string,
        description: string
      ) {
        super(code, description);
        this.questions = [];
      }

      public addQuestion(question: Question<any>): void {
        this.questions.push(question);
      }

      public build(): Fieldset {
        return new Fieldset(
          this.code,
          this.description,
          this.questions
        );
      }
    }

# results matching ""

# No results matching ""