import Cursor from '@/services/datastores/dynomite/lib/Cursor' ; /**
 * ScanResult wraps a Cursor and aggregates results.
 */ export default class ScanAggregator { public readonly cursor : Cursor ; public results : string [ ] ; public numScans : number ; constructor ( cursor ) { this . cursor = cursor ; this . results = new Array < string > ( ) ; this . numScans = 0 ; } get scanCount ( ) : number { return this . numScans ; } get total ( ) : number { return this . results . length ; } param host param nextCursor param results returns public addHostScanResults ( host , nextCursor , results ) { this . numScans += 1 ; this . cursor . updateCursor ( host , nextCursor ) ; this . results = this . results . concat ( results ) ; return this ; } }