+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "ArrayVector"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## ArrayVector class
Signature
```typescript
export declare class ArrayVector extends FunctionalVector implements MutableVector
```
Import
```typescript
import { ArrayVector } from '@grafana/data';
```
Constructors
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [constructor(buffer)](#constructor-buffer) | | Constructs a new instance of the ArrayVector
class |
Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [buffer](#buffer-property) | | T[]
| |
| [length](#length-property) | | number
| |
Methods
| Method | Modifiers | Description |
| --- | --- | --- |
| [add(value)](#add-method) | | |
| [get(index)](#get-method) | | |
| [reverse()](#reverse-method) | | |
| [set(index, value)](#set-method) | | |
| [toArray()](#toarray-method) | | |
| [toJSON()](#tojson-method) | | |
### constructor(buffer)
Constructs a new instance of the `ArrayVector` class
Signature
```typescript
constructor(buffer?: T[]);
```
Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| buffer | T[]
| |
### buffer property
Signature
```typescript
buffer: T[];
```
### length property
Signature
```typescript
get length(): number;
```
### add method
Signature
```typescript
add(value: T): void;
```
Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| value | T
| |
Returns:
`void`
### get method
Signature
```typescript
get(index: number): T;
```
Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| index | number
| |
Returns:
`T`
### reverse method
Signature
```typescript
reverse(): void;
```
Returns:
`void`
### set method
Signature
```typescript
set(index: number, value: T): void;
```
Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| index | number
| |
| value | T
| |
Returns:
`void`
### toArray method
Signature
```typescript
toArray(): T[];
```
Returns:
`T[]`
### toJSON method
Signature
```typescript
toJSON(): T[];
```
Returns:
`T[]`