01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: //
10:
11: package de.uka.ilkd.key.strategy.termfeature;
12:
13: import de.uka.ilkd.key.logic.Term;
14: import de.uka.ilkd.key.strategy.RuleAppCost;
15:
16: /**
17: * A feature that returns a constant value
18: */
19: public class ConstTermFeature implements TermFeature {
20: public RuleAppCost compute(Term term) {
21: return val;
22: }
23:
24: private ConstTermFeature(RuleAppCost p_val) {
25: val = p_val;
26: }
27:
28: public static TermFeature createConst(RuleAppCost p_val) {
29: return new ConstTermFeature(p_val);
30: }
31:
32: private final RuleAppCost val;
33: }
|