01: /*
02: * $Id: DummyTemporalCondition.java 542 2005-10-05 15:38:43Z hengels $
03: * (c) Copyright 2004 con:cern development team.
04: *
05: * This file is part of con:cern (http://concern.org).
06: *
07: * con:cern is free software; you can redistribute it and/or modify
08: * it under the terms of the GNU Lesser General Public License
09: * as published by the Free Software Foundation; either version 2.1
10: * of the License, or (at your option) any later version.
11: *
12: * Please see COPYING for the complete licence.
13: */
14: package org.concern.controller;
15:
16: public class DummyTemporalCondition extends AbstractTemporalCondition {
17: boolean result = false;
18: long anticipatedTransition;
19:
20: public DummyTemporalCondition() {
21: }
22:
23: public DummyTemporalCondition(String name) {
24: super (name);
25: }
26:
27: public DummyTemporalCondition(String name, boolean result) {
28: getEnvironment().put("condition.name", name);
29: this .result = result;
30: }
31:
32: public DummyTemporalCondition(String name, boolean result,
33: long anticipatedTransition) {
34: getEnvironment().put("condition.name", name);
35: this .result = result;
36: this .anticipatedTransition = anticipatedTransition;
37: }
38:
39: public boolean eval(Object subject) {
40: return result;
41: }
42:
43: public long getAnticipatedTransition(Object subject) {
44: return anticipatedTransition;
45: }
46:
47: Integer dummy;
48:
49: public void setDummy(Integer dummy) {
50: this .dummy = dummy;
51: }
52:
53: public Integer getDummy() {
54: return dummy;
55: }
56: }
|