2015-10-10 22:11:13 -07:00
|
|
|
import {bind, provide, Provider} from 'angular2/src/core/di';
|
2015-11-06 17:34:07 -08:00
|
|
|
import {BaseException, WrappedException} from 'angular2/src/facade/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 {
|
2015-10-10 22:11:13 -07:00
|
|
|
static bindTo(delegateToken): Provider[] {
|
2015-05-27 14:57:54 -07:00
|
|
|
return [bind(Validator).toFactory((delegate) => delegate, [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
|
|
|
}
|