Source Code Cross Referenced for LuceneBasicResultSetImpl.java in  » Content-Management-System » hippo » org » apache » slide » search » basic » 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 » Content Management System » hippo » org.apache.slide.search.basic 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $Header$
003:         * $Revision: 125 $
004:         * $Date: 2005-07-01 07:48:18 -0700 $
005:         *
006:         * ====================================================================
007:         *
008:         * Copyright 1999 The Apache Software Foundation 
009:         *
010:         * Licensed under the Apache License, Version 2.0 (the "License");
011:         * you may not use this file except in compliance with the License.
012:         * You may obtain a copy of the License at
013:         *
014:         *     http://www.apache.org/licenses/LICENSE-2.0
015:         *
016:         * Unless required by applicable law or agreed to in writing, software
017:         * distributed under the License is distributed on an "AS IS" BASIS,
018:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
019:         * See the License for the specific language governing permissions and
020:         * limitations under the License.
021:         *
022:         */
023:        package org.apache.slide.search.basic;
024:
025:        // import list
026:        import java.util.AbstractSet;
027:        import java.util.Collection;
028:        import java.util.Vector;
029:        import java.util.Iterator;
030:
031:        /**
032:         * An implementation of the {@link org.apache.slide.search.basic.IBasicResultSet
033:         * IBasicResultSet} interface which keeps the order of added resources.
034:         *
035:         * @version $Revision: 125 $
036:         *
037:         **/
038:        public class LuceneBasicResultSetImpl extends AbstractSet implements 
039:                IBasicResultSet {
040:
041:            /**
042:             * Indicated if the result set is truncated for any reason.
043:             */
044:            protected boolean partial = false;
045:
046:            /**
047:             * container of results
048:             *
049:             */
050:            protected Vector container = new Vector();
051:
052:            /**
053:             * Creates an empty BasicResultSetImpl.
054:             */
055:            public LuceneBasicResultSetImpl() {
056:                this (false);
057:            }
058:
059:            /**
060:             * Creates an empty BasicResultSetImpl and sets the value
061:             * returned by {@link #isPartialResultSet isPartialResultSet()}.
062:             *
063:             * @param      isPartialResult  the value to be returned by
064:             *                              {@link #isPartialResultSet isPartialResultSet()}.
065:             */
066:            public LuceneBasicResultSetImpl(boolean isPartialResult) {
067:                setPartialResultSet(isPartialResult);
068:            }
069:
070:            /**
071:             * Creates a BasicResultSetImpl containing the elements of the given
072:             * <code>collection</code>
073:             *
074:             * @param      collection  the Collection whose elements to add.
075:             */
076:            public LuceneBasicResultSetImpl(Collection collection) {
077:                this (collection, false);
078:            }
079:
080:            /**
081:             * Creates a BasicResultSetImpl containing the elements of the given
082:             * <code>collection</code>
083:             *
084:             * @param      collection       the Collection whose elements to add.
085:             * @param      isPartialResult  the value to be returned by
086:             *                              {@link #isPartialResultSet isPartialResultSet()}.
087:             */
088:            public LuceneBasicResultSetImpl(Collection collection,
089:                    boolean isPartialResult) {
090:                container.addAll(collection);
091:                setPartialResultSet(isPartialResult);
092:            }
093:
094:            /**
095:             * Returns <code>true</code> if the result set is truncated for any reason.
096:             *
097:             * @return     <code>true</code> if the result set is truncated for any reason.
098:             */
099:            public boolean isPartialResultSet() {
100:                return partial;
101:            }
102:
103:            /**
104:             * Sets the value returned by {@link #isPartialResultSet isPartialResultSet()}.
105:             *
106:             * @param      partial  the new value to be returned by
107:             *                      {@link #isPartialResultSet isPartialResultSet()}.
108:             */
109:            public void setPartialResultSet(boolean partial) {
110:                this .partial = partial;
111:            }
112:
113:            // ------------------------------------------------------------------ Set methods
114:
115:            public boolean add(Object o) {
116:                return container.add(o);
117:            }
118:
119:            public boolean addAll(Collection c) {
120:                return container.addAll(c);
121:            }
122:
123:            public boolean remove(Object o) {
124:                return container.remove(o);
125:            }
126:
127:            public boolean removeAll(Collection c) {
128:                return container.removeAll(c);
129:            }
130:
131:            public boolean retainAll(Collection c) {
132:                return container.retainAll(c);
133:            }
134:
135:            public boolean contains(Object o) {
136:                return container.contains(o);
137:            }
138:
139:            public boolean containsAll(Collection c) {
140:                return container.containsAll(c);
141:            }
142:
143:            public boolean isEmpty() {
144:                return container.size() == 0;
145:            }
146:
147:            public boolean equals(Object o) {
148:                return container.equals(o);
149:            }
150:
151:            public void clear() {
152:                container.clear();
153:            }
154:
155:            public int size() {
156:                return container.size();
157:            }
158:
159:            public Iterator iterator() {
160:                return container.iterator();
161:            }
162:
163:            public Object[] toArray() {
164:                return container.toArray();
165:            }
166:
167:            public Object[] toArray(Object[] a) {
168:                return container.toArray(a);
169:            }
170:
171:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.