Source Code Cross Referenced for DoubleList.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:        /* DoubleList
002:         *
003:         * $Id: DoubleList.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 Double values
027:         *
028:         * @author John Erik Halse
029:         */
030:        public class DoubleList extends ListType<Double> {
031:
032:            private static final long serialVersionUID = -5793937164778552546L;
033:
034:            /** Creates a new DoubleList.
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 DoubleList(String name, String description) {
041:                super (name, description);
042:            }
043:
044:            /** Creates a new DoubleList and initializes it with the values from
045:             * another DoubleList.
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 the list from which this lists gets its initial values.
051:             */
052:            public DoubleList(String name, String description, DoubleList l) {
053:                super (name, description);
054:                addAll(l);
055:            }
056:
057:            /** Creates a new DoubleList and initializes it with the values from
058:             * an array of Doubles.
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 DoubleList(String name, String description, Double[] l) {
066:                super (name, description);
067:                addAll(l);
068:            }
069:
070:            /** Creates a new DoubleList and initializes it with the values from
071:             * an double array.
072:             *
073:             * @param name of the list.
074:             * @param description of the list. This string should be suitable for using
075:             *        in a user interface.
076:             * @param l the array from which this lists gets its initial values.
077:             */
078:            public DoubleList(String name, String description, double[] l) {
079:                super (name, description);
080:                addAll(l);
081:            }
082:
083:            /** Add a new {@link java.lang.Double} at the specified index to this list.
084:             *
085:             * @param index index at which the specified element is to be inserted.
086:             * @param element the value to be added.
087:             */
088:            public void add(int index, Double element) {
089:                super .add(index, element);
090:            }
091:
092:            /** Add a new <code>double</code> at the specified index to this list.
093:             *
094:             * @param index index at which the specified element is to be inserted.
095:             * @param element the value to be added.
096:             */
097:            public void add(int index, double element) {
098:                super .add(index, new Double(element));
099:            }
100:
101:            /** Add a new {@link java.lang.Double} at the end of this list.
102:             *
103:             * @param element the value to be added.
104:             */
105:            public void add(Double element) {
106:                super .add(element);
107:            }
108:
109:            /** Add a new double at the end of this list.
110:             *
111:             * @param element the value to be added.
112:             */
113:            public void add(double element) {
114:                super .add(new Double(element));
115:            }
116:
117:            /** Appends all of the elements in the specified list to the end of this
118:             * list, in the order that they are returned by the specified lists's
119:             * iterator.
120:             *
121:             * The behavior of this operation is unspecified if the specified
122:             * collection is modified while the operation is in progress.
123:             *
124:             * @param l list whose elements are to be added to this list.
125:             */
126:            public void addAll(DoubleList l) {
127:                super .addAll(l);
128:            }
129:
130:            /** Appends all of the elements in the specified array to the end of this
131:             * list, in the same order that they are in the array.
132:             *
133:             * @param l array whose elements are to be added to this list.
134:             */
135:            public void addAll(Double[] l) {
136:                for (int i = 0; i < l.length; i++) {
137:                    add(l[i]);
138:                }
139:            }
140:
141:            /** Appends all of the elements in the specified array to the end of this
142:             * list, in the same order that they are in the array.
143:             *
144:             * @param l array whose elements are to be added to this list.
145:             */
146:            public void addAll(double[] l) {
147:                for (int i = 0; i < l.length; i++) {
148:                    add(l[i]);
149:                }
150:            }
151:
152:            /** Replaces the element at the specified position in this list with the
153:             *  specified element.
154:             *
155:             * @param index index at which the specified element is to be inserted.
156:             * @param element element to be inserted.
157:             * @return the element previously at the specified position.
158:             */
159:            public Double set(int index, Double element) {
160:                return (Double) super .set(index, element);
161:            }
162:
163:            /** Check if element is of right type for this list.
164:             *
165:             * If this method gets a String, it tries to convert it to
166:             * the an Double before eventually throwing an exception.
167:             *
168:             * @param element element to check.
169:             * @return element of the right type.
170:             * @throws ClassCastException is thrown if the element was of wrong type
171:             *         and could not be converted.
172:             */
173:            public Double checkType(Object element) throws ClassCastException {
174:                if (element instanceof  Double) {
175:                    return (Double) element;
176:                } else {
177:                    return (Double) SettingsHandler.StringToType(
178:                            (String) element, SettingsHandler.DOUBLE);
179:                }
180:            }
181:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.