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