blob: 9f62e476eaf3750a4f7e8d0b1a73725172ad4d35 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.semantics.rule;
import com.yahoo.prelude.semantics.engine.RuleEvaluation;
/**
* A condition which evaluates the <i>last included</i> version of
* the named condition this is a premise of.
*
* @author bratseth
*/
public class SuperCondition extends Condition {
private Condition condition;
public void setCondition(Condition condition) {
this.condition=condition;
}
public Condition getCondition() {
return condition;
}
public boolean doesMatch(RuleEvaluation e) {
return condition.matches(e);
}
public String toInnerString() {
if (condition==null)
return "@super";
else
return condition.toString();
}
}
|