2016-08-03 15:32:26 -04:00
|
|
|
import {BaseException, WrappedException} from '@angular/facade/src/exceptions';
|
2015-02-11 13:13:49 -05:00
|
|
|
|
2015-05-27 17:57:54 -04:00
|
|
|
import {MeasureValues} from './measure_values';
|
2015-02-17 17:30:24 -05:00
|
|
|
|
2015-02-11 13:13:49 -05:00
|
|
|
/**
|
|
|
|
* A Validator calculates a valid sample out of the complete sample.
|
|
|
|
* A valid sample is a sample that represents the population that should be observed
|
|
|
|
* in the correct way.
|
|
|
|
*/
|
2015-09-25 17:48:17 -04:00
|
|
|
export abstract class Validator {
|
2016-06-02 20:30:40 -04:00
|
|
|
static bindTo(delegateToken): any[] {
|
|
|
|
return [{provide: Validator, useFactory: (delegate) => delegate, deps: [delegateToken]}];
|
2015-02-20 16:32:54 -05:00
|
|
|
}
|
|
|
|
|
2015-02-11 13:13:49 -05:00
|
|
|
/**
|
|
|
|
* Calculates a valid sample out of the complete sample
|
|
|
|
*/
|
2015-08-28 14:29:19 -04:00
|
|
|
validate(completeSample: MeasureValues[]): MeasureValues[] { throw new BaseException('NYI'); }
|
2015-02-11 13:13:49 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a Map that describes the properties of the validator
|
|
|
|
* (e.g. sample size, ...)
|
|
|
|
*/
|
2015-10-02 19:47:54 -04:00
|
|
|
describe(): {[key: string]: any} { throw new BaseException('NYI'); }
|
2015-05-27 17:57:54 -04:00
|
|
|
}
|