Skip to content

Commit

Permalink
Construto de vetor passa a armazenar informação do tamanho inicial.
Browse files Browse the repository at this point in the history
  • Loading branch information
leonelsanchesdasilva committed Jun 4, 2024
1 parent 4104956 commit e9400ca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fontes/construtos/vetor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ import { Construto } from './construto';
export class Vetor implements Construto {
linha: number;
hashArquivo: number;
tamanho: number;

valores: any[];

constructor(hashArquivo: number, linha: number, valores: any[]) {
constructor(hashArquivo: number, linha: number, valores: any[], tamanho?: number) {
this.linha = linha;
this.hashArquivo = hashArquivo;

this.valores = valores;
if (tamanho) {
this.tamanho = tamanho;
} else {
this.tamanho = this.valores.length;
}
}

async aceitar(visitante: VisitanteComumInterface): Promise<any> {
Expand Down

0 comments on commit e9400ca

Please sign in to comment.