Source Code Cross Referenced for StringList.java in  » Web-Crawler » heritrix » org » archive » crawler » settings » 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 » Web Crawler » heritrix » org.archive.crawler.settings 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* StringList
002:         *
003:         * $Id: StringList.java 4648 2006-09-25 16:25:53Z paul_jack $
004:         * Created on Dec 18, 2003
005:         *
006:         * Copyright (C) 2003 Internet Archive.
007:         *
008:         * This file is part of the Heritrix web crawler (crawler.archive.org).
009:         *
010:         * Heritrix is free software; you can redistribute it and/or modify
011:         * it under the terms of the GNU Lesser Public License as published by
012:         * the Free Software Foundation; either version 2.1 of the License, or
013:         * any later version.
014:         *
015:         * Heritrix is distributed in the hope that it will be useful,
016:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
017:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
018:         * GNU Lesser Public License for more details.
019:         *
020:         * You should have received a copy of the GNU Lesser Public License
021:         * along with Heritrix; if not, write to the Free Software
022:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
023:         */
024:        package org.archive.crawler.settings;
025:
026:        /** List of String values.
027:         *
028:         * @author John Erik Halse
029:         */
030:        public class StringList extends ListType<String> {
031:
032:            private static final long serialVersionUID = 3181868189684416390L;
033:
034:            /** Creates a new StringList.
035:             *
036:             * @param name of the list.
037:             * @param description of the list. This string should be suitable for using
038:             *        in a user interface.
039:             */
040:            public StringList(String name, String description) {
041:                super (name, description);
042:            }
043:
044:            /** Creates a new StringList and initializes it with the values from
045:             * another StringList.
046:             *
047:             * @param name of the list.
048:             * @param description of the list. This string should be suitable for using
049:             *        in a user interface.
050:             * @param l
051:             */
052:            public StringList(String name, String description, StringList l) {
053:                super (name, description);
054:                addAll(l);
055:            }
056:
057:            /** Creates a new StringList and initializes it with the values from
058:             * an array of Strings.
059:             *
060:             * @param name of the list.
061:             * @param description of the list. This string should be suitable for using
062:             * in a user interface.
063:             * @param l the array from which this lists gets its initial values.
064:             */
065:            public StringList(String name, String description, String[] l) {
066:                super (name, description);
067:                addAll(l);
068:            }
069:
070:            /** Add a new {@link java.lang.String} at the specified index to this list.
071:             *
072:             * @param index index at which the specified element is to be inserted.
073:             * @param element the value to be added.
074:             */
075:            public void add(int index, String element) {
076:                super .add(index, element);
077:            }
078:
079:            /** Add a new {@link java.lang.String} at the end of this list.
080:             *
081:             * @param element the value to be added.
082:             */
083:            public void add(String element) {
084:                super .add(element);
085:            }
086:
087:            /** Appends all of the elements in the specified list to the end of this
088:             * list, in the order that they are returned by the specified lists's
089:             * iterator.
090:             *
091:             * The behavior of this operation is unspecified if the specified
092:             * collection is modified while the operation is in progress.
093:             *
094:             * @param l list whose elements are to be added to this list.
095:             */
096:            public void addAll(StringList l) {
097:                super .addAll(l);
098:            }
099:
100:            /** Appends all of the elements in the specified array to the end of this
101:             * list, in the same order that they are in the array.
102:             *
103:             * @param l array whose elements are to be added to this list.
104:             */
105:            public void addAll(String[] l) {
106:                for (int i = 0; i < l.length; i++) {
107:                    add(l[i]);
108:                }
109:            }
110:
111:            /** Replaces the element at the specified position in this list with the
112:             *  specified element.
113:             *
114:             * @param index index at which the specified element is to be inserted.
115:             * @param element element to be inserted.
116:             * @return the element previously at the specified position.
117:             */
118:            public String set(int index, String element) {
119:                return (String) super .set(index, element);
120:            }
121:
122:            /** Check if element is of right type for this list.
123:             *
124:             * @param element element to check.
125:             * @return element of the right type.
126:             * @throws ClassCastException is thrown if the element was of wrong type
127:             *         and could not be converted.
128:             */
129:            public String checkType(Object element) throws ClassCastException {
130:                return (String) element;
131:            }
132:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.