import { IType } from "../../matching/IType" ; private export class CommandPayload { /**
     * Ordered list of values
     */ public get values ( ) : any [ ] { return this . _values ; } /**
     * Ordered list of value classes
     */ public get classes ( ) : IType < any > [ ] { return this . _classes ; } /**
     * The number of payload items
     */ public get length ( ) : number { return this . _classes ? this . _classes . length : 0 ; } private _values : any [ ] ; private _classes : IType < any > [ ] ; param values param classes constructor ( values ? , classes ? ) { this . _values = values ; this . _classes = classes ; } param payloadValue param payloadClass return public addPayload < T > ( payloadValue , payloadClass ) { if ( this . _values ) { this . _values . push ( payloadValue ) ; } else { this . _values = [ payloadValue ] ; } if ( this . _classes ) { this . _classes . push ( payloadClass ) ; } else { this . _classes = [ payloadClass ] ; } return this ; } return public hasPayload ( ) { let payload = false ; if ( this . _values && this . _classes ) { payload = this . _values . length > 0 && this . _classes . length > 0 && this . _values . length === this . _classes . length ; } return payload ; } }