4 * Copyright 2004-2007 MTBJ, Inc.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 package com
.dtrules
.decisiontables
;
21 import com
.dtrules
.infrastructure
.RulesException
;
22 import com
.dtrules
.session
.DTState
;
24 public interface DTNode
{
25 static class Coordinate
{
28 Coordinate(int row
, int col
){
35 public void setCol(int col
) {
41 public void setRow(int row
) {
49 * Returns a clone of this node, and all nodes below (if it
53 public DTNode
cloneDTNode();
55 public int countColumns();
57 void execute(DTState state
) throws RulesException
;
58 Coordinate
validate();
61 * For two DTNodes are equal if every path through both nodes
62 * execute exactly the same set of Actions.
66 boolean equalsNode(DTNode node
);
68 * Returns an ANode which represents the execution of every
69 * path through the given DTNode. If different paths through
70 * the DTNode execute different actions, this method returns
71 * a null. Note that ANodes always return themselves (i.e.
72 * there is only one execution path through an ANode).
74 ANode
getCommonANode();