Source Code Cross Referenced for ListView.java in  » Workflow-Engines » osbl-1_0 » org » conform » util » 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 » Workflow Engines » osbl 1_0 » org.conform.util 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.conform.util;
002:
003:        import java.util.*;
004:
005:        public class ListView implements  List {
006:            Collection collection = Collections.EMPTY_LIST;
007:            Iterator iterator;
008:            int index = -1;
009:            Object object;
010:
011:            public ListView(Collection collection) {
012:                this .collection = collection;
013:            }
014:
015:            public Object get(int index) {
016:                if (index < this .index || iterator == null) {
017:                    iterator = collection.iterator();
018:                    this .index = -1;
019:                }
020:                for (; this .index < index; this .index++)
021:                    object = iterator.next();
022:
023:                return object;
024:            }
025:
026:            public Object remove(int index) {
027:                Object object = get(index);
028:                collection.remove(object);
029:                iterator = null;
030:                return object;
031:            }
032:
033:            public void add(int index, Object element) {
034:                add(object);
035:            }
036:
037:            public int indexOf(Object o) {
038:                throw new UnsupportedOperationException(
039:                        "index of not supported");
040:            }
041:
042:            public int lastIndexOf(Object o) {
043:                return indexOf(o);
044:            }
045:
046:            public boolean addAll(int index, Collection c) {
047:                boolean result = addAll(c);
048:                if (result)
049:                    iterator = null;
050:                return result;
051:            }
052:
053:            public List subList(int fromIndex, int toIndex) {
054:                throw new UnsupportedOperationException("sublist not supported");
055:            }
056:
057:            public ListIterator listIterator() {
058:                throw new UnsupportedOperationException(
059:                        "list iterator not supported");
060:            }
061:
062:            public ListIterator listIterator(int index) {
063:                throw new UnsupportedOperationException(
064:                        "list iterator not supported");
065:            }
066:
067:            public Object set(int index, Object element) {
068:                Object object = get(index);
069:                collection.remove(object);
070:                add(element);
071:                return object;
072:            }
073:
074:            public int hashCode() {
075:                return collection.hashCode();
076:            }
077:
078:            public int size() {
079:                return collection.size();
080:            }
081:
082:            public void clear() {
083:                collection.clear();
084:            }
085:
086:            public boolean isEmpty() {
087:                return collection.isEmpty();
088:            }
089:
090:            public Object[] toArray() {
091:                return collection.toArray();
092:            }
093:
094:            public boolean add(Object o) {
095:                boolean result = collection.add(o);
096:                if (result)
097:                    iterator = null;
098:                return result;
099:            }
100:
101:            public boolean contains(Object o) {
102:                return collection.contains(o);
103:            }
104:
105:            public boolean equals(Object o) {
106:                return collection.equals(o);
107:            }
108:
109:            public boolean remove(Object o) {
110:                return collection.remove(o);
111:            }
112:
113:            public boolean addAll(Collection c) {
114:                boolean result = collection.addAll(c);
115:                if (result)
116:                    iterator = null;
117:                return result;
118:            }
119:
120:            public boolean containsAll(Collection c) {
121:                return collection.containsAll(c);
122:            }
123:
124:            public boolean removeAll(Collection c) {
125:                boolean result = collection.removeAll(c);
126:                if (result)
127:                    iterator = null;
128:                return result;
129:            }
130:
131:            public boolean retainAll(Collection c) {
132:                boolean result = collection.retainAll(c);
133:                if (result)
134:                    iterator = null;
135:                return result;
136:            }
137:
138:            public Iterator iterator() {
139:                return collection.iterator();
140:            }
141:
142:            public Object[] toArray(Object a[]) {
143:                return collection.toArray(a);
144:            }
145:
146:            public Collection getCollection() {
147:                return collection;
148:            }
149:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.