import {ScriptAccount} from "../../scriptAccounts/ScriptAccount"; export class ScriptAccountCondition { scriptAccount: ScriptAccount minValue: number maxValue: number private constructor(scriptAccount: ScriptAccount, minValue: number, maxValue: number) { this.scriptAccount = scriptAccount; this.minValue = minValue; this.maxValue = maxValue; } static constructScriptAccountCondition(scriptAccount: ScriptAccount, minValue: number, maxValue: number) { if(scriptAccount == undefined || minValue == undefined || maxValue == undefined || minValue > maxValue) return undefined return new ScriptAccountCondition(scriptAccount, minValue, maxValue) } extendCondition(condition: ScriptAccountCondition) { } isContradicting(condition: ScriptAccountCondition) { return condition.scriptAccount === this.scriptAccount && (this.maxValue < condition.minValue || this.minValue > condition.maxValue) } }