2015-09-04 01:01:36 -04:00
|
|
|
import {bind, Binding} from 'angular2/src/core/di';
|
2015-08-28 14:29:19 -04:00
|
|
|
import {StringMap} from 'angular2/src/core/facade/collection';
|
2015-09-10 18:25:36 -04:00
|
|
|
import {ABSTRACT} from 'angular2/src/core/facade/lang';
|
|
|
|
import {BaseException, WrappedException} from 'angular2/src/core/facade/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.
|
|
|
|
*/
|
|
|
|
@ABSTRACT()
|
|
|
|
export class Validator {
|
2015-07-09 20:32:42 -04:00
|
|
|
static bindTo(delegateToken): Binding[] {
|
2015-05-27 17:57:54 -04:00
|
|
|
return [bind(Validator).toFactory((delegate) => delegate, [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-05-27 17:57:54 -04:00
|
|
|
describe(): StringMap<string, any> { throw new BaseException('NYI'); }
|
|
|
|
}
|