Source Code Cross Referenced for RoleUnresolvedList.java in  » JMX » jfoxmx » javax » management » relation » 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 » JMX » jfoxmx » javax.management.relation 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* JFox, the OpenSource J2EE Application Server
002:         *
003:         * Copyright (C) 2002 huihoo.org
004:         * Distributable under GNU LGPL license
005:         * See the GNU Lesser General Public License for more details.
006:         */
007:
008:        package javax.management.relation;
009:
010:        import java.util.ArrayList;
011:        import java.util.List;
012:
013:        /**
014:         * A RoleUnresolvedList represents a list of RoleUnresolved objects,
015:         * representing roles not retrieved from a relation due to a problem
016:         * encountered whe trying to access (read or write to roles)
017:         *
018:         * @author <a href="mailto:young_yy@hotmail.org">Young Yang</a>
019:         */
020:
021:        public class RoleUnresolvedList extends ArrayList {
022:
023:            /**
024:             * Constructs an empty RoleUnresolvedList.
025:             */
026:            public RoleUnresolvedList() {
027:                super ();
028:            }
029:
030:            /**
031:             * Constructs an empty RoleUnresolvedList with the initial capacity
032:             * specified.
033:             *
034:             * @param initialCapacity  initial capacity
035:             */
036:            public RoleUnresolvedList(int initialCapacity) {
037:                super (initialCapacity);
038:            }
039:
040:            /**
041:             * Constructs a RoleUnresolvedList containing the elements of the
042:             * ArrayList specified, in the order in which they are returned
043:             * by the ArrayList's iterator. The RoleUnresolvedList instance has
044:             * an initial capacity of 110% of the size of the ArrayList
045:             * specified.
046:             *
047:             * @param roleUnresList  roleUnresList of RoleUnresolved objects
048:             *
049:             * @exception IllegalArgumentException  if:
050:             * <P>- null parameter
051:             * <P>or
052:             * <P>- an element in the ArrayList is not a RoleUnresolved
053:             */
054:            public RoleUnresolvedList(List roleUnresList)
055:                    throws IllegalArgumentException {
056:
057:                if (roleUnresList == null) {
058:                    throw new IllegalArgumentException(
059:                            "Invalid parameter: roleUnresList can not be null");
060:                }
061:
062:                for (int i = 0; i < roleUnresList.size(); i++) {
063:                    Object obj = roleUnresList.get(i);
064:                    if (!(obj instanceof  RoleUnresolved)) {
065:                        throw new IllegalArgumentException(
066:                                "The element at index " + i
067:                                        + "is not a RoleUnresolved, "
068:                                        + obj.toString());
069:                    }
070:                }
071:                super .addAll(roleUnresList);
072:            }
073:
074:            /**
075:             * Adds the RoleUnresolved specified as the last element of the list.
076:             *
077:             * @param roleUnres - the unresolved role to be added.
078:             *
079:             * @exception IllegalArgumentException  if the unresolved role is null.
080:             */
081:            public void add(RoleUnresolved roleUnres)
082:                    throws IllegalArgumentException {
083:                if (roleUnres == null) {
084:                    throw new IllegalArgumentException(
085:                            "Invalid parameter: roleUnres can not be null");
086:                }
087:                super .add(roleUnres);
088:            }
089:
090:            /**
091:             * Inserts the unresolved role specified as an element at the position
092:             * specified.
093:             * Elements with an index greater than or equal to the current position are
094:             * shifted up.
095:             *
096:             * @param index - The position in the list where the new
097:             * RoleUnresolved object is to be inserted.
098:             * @param roleUnres - The RoleUnresolved object to be inserted.
099:             *
100:             * @exception IllegalArgumentException  if the unresolved role is null.
101:             */
102:            public void add(int index, RoleUnresolved roleUnres)
103:                    throws IllegalArgumentException, IndexOutOfBoundsException {
104:                if (roleUnres == null) {
105:                    throw new IllegalArgumentException(
106:                            "Invalid parameter: roleUnres can not be null");
107:                }
108:                super .add(index, roleUnres);
109:            }
110:
111:            /**
112:             * Sets the element at the position specified to be the unresolved role
113:             * specified.
114:             * The previous element at that position is discarded.
115:             *
116:             * @param index - The position specified.
117:             * @param roleUnres - The value to which the unresolved role element
118:             * should be set.
119:             *
120:             * @exception IllegalArgumentException   if the unresolved role is null.
121:             */
122:            public void set(int index, RoleUnresolved roleUnres)
123:                    throws IllegalArgumentException, IndexOutOfBoundsException {
124:                if (roleUnres == null) {
125:                    throw new IllegalArgumentException(
126:                            "Invalid parameter: roleUnres can not be null");
127:                }
128:                super .set(index, roleUnres);
129:            }
130:
131:            /**
132:             * Appends all the elements in the RoleUnresolvedList specified to the end
133:             * of the list, in the order in which they are returned by the Iterator of
134:             * the RoleUnresolvedList specified.
135:             *
136:             * @param roleUnresolvedList - Elements to be inserted into the list
137:             * (can be null).
138:             *
139:             * @exception IndexOutOfBoundsException  if accessing with an index
140:             * outside of the list.
141:             */
142:            public boolean addAll(RoleUnresolvedList roleUnresolvedList)
143:                    throws IndexOutOfBoundsException {
144:                if (roleUnresolvedList == null) {
145:                    return true;
146:                }
147:                return (super .addAll(roleUnresolvedList));
148:            }
149:
150:            /**
151:             * Inserts all of the elements in the RoleUnresolvedList specified into
152:             * this list, starting at the specified position, in the order in which
153:             * they are returned by the Iterator of the RoleUnresolvedList specified.
154:             *
155:             * @param index - Position at which to insert the first element from the
156:             * RoleUnresolvedList specified.
157:             * @param roleUnresolvedList - Elements to be inserted into the list.
158:             *
159:             * @exception IllegalArgumentException  if the role is null.
160:             * @exception IndexOutOfBoundsException  if accessing with an index
161:             * outside of the list.
162:             */
163:            public boolean addAll(int index,
164:                    RoleUnresolvedList roleUnresolvedList)
165:                    throws IllegalArgumentException, IndexOutOfBoundsException {
166:                if (roleUnresolvedList == null) {
167:                    throw new IllegalArgumentException(
168:                            "Invalid parameter: roleUnres can not be null");
169:                }
170:
171:                return (super .addAll(index, roleUnresolvedList));
172:            }
173:
174:            /**
175:             * Cloning
176:             * <P>Returns a new RoleList, but no copy of the included elements.
177:             */
178:            public Object clone() {
179:                ArrayList array = (ArrayList) (super .clone());
180:                return new RoleList(array);
181:            }
182:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.