01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.filter.text.cql2;
17:
18: import org.geotools.filter.text.cql2.Token;
19:
20: /**
21: * Maintains the result of building process.
22: *
23: * @since 2.4
24: * @author Mauricio Pazos (Axios Engineering)
25: * @author Gabriel Roldan (Axios Engineering)
26: * @version $Id: Result.java 28415 2007-12-18 09:54:31Z vmpazos $
27: * @source $URL:
28: * http://svn.geotools.org/geotools/trunk/gt/modules/library/cql/src/main/java/org/geotools/text/filter/Result.java $
29: */
30: final class Result {
31: private int nodeType = 0;
32: private Object built = null;
33: private Token token = null;
34:
35: Result(Object built, Token token, int nodeType) {
36: this .built = built;
37: this .token = token;
38: this .nodeType = nodeType;
39: }
40:
41: public String toString() {
42: assert this .token != null;
43:
44: return "Result [TOKEN(" + this .token.toString() + ");"
45: + "BUILT(" + built + "); NODE_TYPE("
46: + new Integer(nodeType) + ") ]";
47: }
48:
49: public final Object getBuilt() {
50: return this .built;
51: }
52:
53: public final int getNodeType() {
54: return this .nodeType;
55: }
56:
57: public final Token getToken() {
58: return this.token;
59: }
60: }
|