# Class T8QuantitySetRepository<TUnit>

Repository for managing and retrieving quantity sets from a T8 Client Model.

#### Example

    const repository = new T8QuantitySetRepository(dto, units);
    const quantities = repository.getQuantities(indices);

#### Type Parameters

- TUnit

  The type used to represent units of measurement

##### Index

### Constructors

constructor

### Properties

_valueSets

### Methods

getQuantities
getValueSets

## Constructors

### constructor

- new T8QuantitySetRepository<TUnit>(
  sets: T8ClientElementQuantitiesDTO[],
  setNameValues: string[],
  valueNameValues: string[],
  valueValues: T8ClientPropertyValueDTO[],
  valueTypeValues: string[],
  strings: string[],
  units: TUnit[],
  ): T8QuantitySetRepository<TUnit>

  #### Type Parameters

  - TUnit

  #### Parameters

  - sets: T8ClientElementQuantitiesDTO[]
  - setNameValues: string[]
  - valueNameValues: string[]
  - valueValues: T8ClientPropertyValueDTO[]
  - valueTypeValues: string[]
  - strings: string[]
  - units: TUnit[]

  #### Returns T8QuantitySetRepository<TUnit>

## Properties

### `Protected`_valueSets

_valueSets: T8QuantitySet<TUnit>[]

## Methods

### getQuantities

- getQuantities(indices?: TypedArray): Record<string, T8QuantitySet<TUnit>>

  Retrieves quantity sets for a collection of elements.

  #### Parameters

  - `Optional` indices: TypedArray

    Optional array of indices into the quantity sets array

  #### Returns Record<string, T8QuantitySet<TUnit>>

  Record of quantity sets keyed by their names, or empty record if no indices provided

  #### Example

      const quantities = repository.getQuantities(new Uint16Array([0, 1]));
      const baseQuantities = quantities['Qto_WallBaseQuantities'];
      console.log(baseQuantities.quantities['Length'].value);

### `Protected` getValueSets

- getValueSets(indices?: TypedArray): Record<string, T8QuantitySet<TUnit>>

  #### Parameters

  - `Optional` indices: TypedArray

  #### Returns Record<string, T8QuantitySet<TUnit>>