Source Code Cross Referenced for TreeSetDbImpl.java in  » Database-DBMS » myoodb-2.2.1 » org » myoodb » collectable » 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 » Database DBMS » myoodb 2.2.1 » org.myoodb.collectable 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        ///////////////////////////////////////////////////////////////////////////////
002:        //
003:        //   Copyright (C) 2003-@year@ by Thomas M. Hazel, MyOODB (www.myoodb.org)
004:        //
005:        //                          All Rights Reserved
006:        //
007:        //   This program is free software; you can redistribute it and/or modify
008:        //   it under the terms of the GNU General Public License and GNU Library
009:        //   General Public License as published by the Free Software Foundation;
010:        //   either version 2, or (at your option) any later version.
011:        //
012:        //   This program is distributed in the hope that it will be useful,
013:        //   but WITHOUT ANY WARRANTY; without even the implied warranty of
014:        //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
015:        //   GNU General Public License and GNU Library General Public License
016:        //   for more details.
017:        //
018:        //   You should have received a copy of the GNU General Public License
019:        //   and GNU Library General Public License along with this program; if
020:        //   not, write to the Free Software Foundation, 675 Mass Ave, Cambridge,
021:        //   MA 02139, USA.
022:        //
023:        ///////////////////////////////////////////////////////////////////////////////
024:        package org.myoodb.collectable;
025:
026:        public class TreeSetDbImpl extends CollectableDbImpl implements  TreeSet {
027:            private java.util.TreeSet m_treeSet;
028:
029:            public TreeSetDbImpl() {
030:                m_treeSet = new java.util.TreeSet();
031:            }
032:
033:            public TreeSetDbImpl(java.util.Comparator cmp) {
034:                m_treeSet = new java.util.TreeSet(cmp);
035:            }
036:
037:            public void fixUpReference(long fixUpTime) {
038:                if (referenceHasBeenFixedUp(fixUpTime) == true) {
039:                    return;
040:                }
041:
042:                super .fixUpReference(fixUpTime);
043:
044:                synchronized (m_treeSet) {
045:                    CollectableDbImpl.fixUpReference(m_treeSet, fixUpTime);
046:                }
047:            }
048:
049:            public boolean add(Object o) {
050:                boolean retval = false;
051:
052:                synchronized (m_treeSet) {
053:                    retval = m_treeSet.add(o);
054:                }
055:
056:                return retval;
057:            }
058:
059:            public boolean addAll(java.util.Collection c) {
060:                boolean retval = false;
061:
062:                synchronized (m_treeSet) {
063:                    retval = m_treeSet.addAll(c);
064:                }
065:
066:                return retval;
067:            }
068:
069:            public boolean contains(Object o) {
070:                boolean retval = false;
071:
072:                synchronized (m_treeSet) {
073:                    retval = m_treeSet.contains(o);
074:                }
075:
076:                return retval;
077:            }
078:
079:            public boolean remove(Object o) {
080:                boolean retval = false;
081:
082:                synchronized (m_treeSet) {
083:                    retval = m_treeSet.remove(o);
084:                }
085:
086:                return retval;
087:            }
088:
089:            public boolean removeAll(java.util.Collection c) {
090:                boolean retval = false;
091:
092:                synchronized (m_treeSet) {
093:                    retval = m_treeSet.removeAll(c);
094:                }
095:
096:                return retval;
097:            }
098:
099:            public Object first() {
100:                Object retval = null;
101:
102:                synchronized (m_treeSet) {
103:                    retval = m_treeSet.first();
104:                }
105:
106:                return retval;
107:            }
108:
109:            public Object last() {
110:                Object retval = null;
111:
112:                synchronized (m_treeSet) {
113:                    retval = m_treeSet.last();
114:                }
115:
116:                return retval;
117:            }
118:
119:            public void clear() {
120:                synchronized (m_treeSet) {
121:                    m_treeSet.clear();
122:                }
123:            }
124:
125:            public int size() {
126:                int retval = -1;
127:
128:                synchronized (m_treeSet) {
129:                    retval = m_treeSet.size();
130:                }
131:
132:                return retval;
133:            }
134:
135:            public String toString() {
136:                String retval = null;
137:
138:                synchronized (m_treeSet) {
139:                    retval = m_treeSet.toString();
140:                }
141:
142:                return retval;
143:            }
144:
145:            public boolean equals(Object obj) {
146:                boolean retval = false;
147:
148:                synchronized (m_treeSet) {
149:                    retval = m_treeSet.equals(obj);
150:                }
151:
152:                return retval;
153:            }
154:
155:            public java.util.TreeSet collection() {
156:                return m_treeSet;
157:            }
158:
159:            public java.util.ArrayList toArrayList() {
160:                java.util.ArrayList retval = null;
161:
162:                synchronized (m_treeSet) {
163:                    retval = new java.util.ArrayList(m_treeSet);
164:                }
165:
166:                return retval;
167:            }
168:
169:            public Iterator iterator() {
170:                return (Iterator) getDatabase().createObject(
171:                        IteratorDbImpl.class.getName(), "java.util.Collection",
172:                        new Object[] { m_treeSet });
173:            }
174:
175:            public java.util.SortedSet headSet(Object toElement) {
176:                synchronized (m_treeSet) {
177:                    return m_treeSet.headSet(toElement);
178:                }
179:            }
180:
181:            public java.util.SortedSet subSet(Object fromElement,
182:                    Object toElement) {
183:                synchronized (m_treeSet) {
184:                    return m_treeSet.subSet(fromElement, toElement);
185:                }
186:            }
187:
188:            public java.util.SortedSet tailSet(Object fromElement) {
189:                synchronized (m_treeSet) {
190:                    return m_treeSet.tailSet(fromElement);
191:                }
192:            }
193:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.