Source Code Cross Referenced for CalcResult.java in  » GIS » GeoTools-2.4.1 » org » geotools » feature » visitor » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.feature.visitor 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *    GeoTools - OpenSource mapping toolkit
003:         *    http://geotools.org
004:         *    (C) 2005-2006, GeoTools Project Managment Committee (PMC)
005:         *    
006:         *    This library is free software; you can redistribute it and/or
007:         *    modify it under the terms of the GNU Lesser General Public
008:         *    License as published by the Free Software Foundation;
009:         *    version 2.1 of the License.
010:         *
011:         *    This library is distributed in the hope that it will be useful,
012:         *    but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         *    Lesser General Public License for more details.
015:         */
016:        package org.geotools.feature.visitor;
017:
018:        import java.io.IOException;
019:        import java.util.List;
020:        import java.util.Map;
021:        import java.util.Set;
022:
023:        import com.vividsolutions.jts.geom.Envelope;
024:        import com.vividsolutions.jts.geom.Geometry;
025:        import com.vividsolutions.jts.geom.Point;
026:
027:        /**
028:         * Encapsulates the results from a FeatureCalc, and includes methods for
029:         * obtaining and merging results.
030:         *
031:         * @author Cory Horner, Refractions
032:         *
033:         * @see FeatureCalc
034:         * @since 2.2.M2
035:         * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/main/src/main/java/org/geotools/feature/visitor/CalcResult.java $
036:         */
037:        public interface CalcResult {
038:            /**
039:             * Returns true if the target results is a compatible type with the current
040:             * results, with compatible meaning that the two results may be merged.
041:             *
042:             * @param targetResults the second CalcResult Object
043:             *
044:             * @return true if the targetResults can be merged with the current results
045:             */
046:            public boolean isCompatible(CalcResult targetResults);
047:
048:            /**
049:             * Returns the merged results of two CalcResult. The way in which the
050:             * results are merged is dependent on the type of the results added. A new
051:             * instance is created containing the merged results.
052:             * 
053:             * <p>
054:             * For example: merging two min functions would return the smaller of the
055:             * two values; merging a count and a sum would return an average.
056:             * </p>
057:             *
058:             * @param resultsToAdd
059:             *
060:             * @return the merged results
061:             */
062:            public CalcResult merge(CalcResult resultsToAdd);
063:
064:            /**
065:             * Actual answer
066:             *
067:             * @return the calculation result as a generic object
068:             */
069:            public Object getValue();
070:
071:            /**
072:             * Access getValue as an int
073:             * 
074:             * @return the calculation result as a int (or 0 if not applicable)
075:             * @throws IOException 
076:             */
077:            public int toInt();
078:
079:            /**
080:             * Access getValue as a double
081:             *
082:             * @return the calculation result as a double (or 0 if not applicable)
083:             */
084:            public double toDouble();
085:
086:            /**
087:             * Access getValue as a string
088:             *
089:             * @return the calculation result as a string (or "" if not applicable)
090:             */
091:            public String toString();
092:
093:            /**
094:             * Access getValue as a long
095:             *
096:             * @return the calculation result as a long (or 0 if not applicable)
097:             */
098:            public long toLong();
099:
100:            /**
101:             * Access getValue as a float
102:             *
103:             * @return the calculation result as a float (or 0 if not applicable)
104:             */
105:            public float toFloat();
106:
107:            /**
108:             * Access getValue as a geometry
109:             *
110:             * @return the calculation result as a geometry (or null if not applicable)
111:             */
112:            public Geometry toGeometry();
113:
114:            /**
115:             * Access getValue as an envelope
116:             *
117:             * @return the calculation result as an envelope (or null if not applicable)
118:             */
119:            public Envelope toEnvelope();
120:
121:            /**
122:             * Access getValue as a point
123:             *
124:             * @return the calculation result as a point (or null if not applicable)
125:             */
126:            public Point toPoint();
127:
128:            /**
129:             * Access getValue as a set
130:             *
131:             * @return the calculation result as a set (or null if not applicable)
132:             */
133:            public Set toSet();
134:
135:            /**
136:             * Access getValue as a list
137:             *
138:             * @return the calculation result as a list (or null if not applicable)
139:             */
140:            public List toList();
141:
142:            /**
143:             * Access getValue as an array
144:             *
145:             * @return the calculation result as an array (or null if not applicable)
146:             */
147:            public Object[] toArray();
148:
149:            /**
150:             * Access getValue as a map
151:             *
152:             * @return the calculation result as a map (or null if not applicable)
153:             */
154:            public Map toMap();
155:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.