Source Code Cross Referenced for FlowRate.java in  » Science » Cougaar12_4 » org » cougaar » planning » ldm » measure » 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 » Science » Cougaar12_4 » org.cougaar.planning.ldm.measure 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * <copyright>
0003:         *  
0004:         *  Copyright 1997-2004 BBNT Solutions, LLC
0005:         *  under sponsorship of the Defense Advanced Research Projects
0006:         *  Agency (DARPA).
0007:         * 
0008:         *  You can redistribute this software and/or modify it under the
0009:         *  terms of the Cougaar Open Source License as published on the
0010:         *  Cougaar Open Source Website (www.cougaar.org).
0011:         * 
0012:         *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0013:         *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0014:         *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
0015:         *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0016:         *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0017:         *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0018:         *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0019:         *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0020:         *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0021:         *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0022:         *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0023:         *  
0024:         * </copyright>
0025:         */
0026:
0027:        /* @generated Thu Sep 27 15:20:43 EDT 2007 from /u01/builds/cougaar/B12_4/B12_4/070927151721/src/planning/src/org/cougaar/planning/ldm/measure/measures.def - DO NOT HAND EDIT */
0028:        /** Immutable implementation of FlowRate.
0029:         **/package org.cougaar.planning.ldm.measure;
0030:
0031:        import java.io.*;
0032:
0033:        public final class FlowRate extends AbstractMeasure implements 
0034:                Externalizable, Derivative, Rate {
0035:            // the value is stored as liters/second
0036:            private double theValue;
0037:
0038:            /** No-arg constructor is only for use by serialization **/
0039:            public FlowRate() {
0040:            }
0041:
0042:            // private constructor
0043:            private FlowRate(double v) {
0044:                theValue = v;
0045:            }
0046:
0047:            /** @param unit One of the constant units of FlowRate **/
0048:            public FlowRate(double v, int unit) {
0049:                if (unit >= 0 && unit <= MAXUNIT)
0050:                    theValue = v / getConvFactor(unit);
0051:                else
0052:                    throw new UnknownUnitException();
0053:            }
0054:
0055:            /** @param unit1 One of the constant units of Volume
0056:             *  @param unit2 One of the constant units of Duration
0057:             **/
0058:            public FlowRate(double v, int unit1, int unit2) {
0059:                if (unit1 >= 0 && unit1 <= Volume.MAXUNIT && unit2 >= 0
0060:                        && unit2 <= Duration.MAXUNIT)
0061:                    theValue = v * Volume.getConvFactor(unit1)
0062:                            / Duration.getConvFactor(unit2);
0063:                else
0064:                    throw new UnknownUnitException();
0065:            }
0066:
0067:            /** @param num An instance of Volume to use as numerator
0068:             *  @param den An instance of Durationto use as denominator
0069:             **/
0070:            public FlowRate(Volume num, Duration den) {
0071:                theValue = num.getValue(0) / den.getValue(0);
0072:            }
0073:
0074:            /** takes strings of the form "Number unit" **/
0075:            public FlowRate(String s) {
0076:                int i = indexOfType(s);
0077:                if (i < 0)
0078:                    throw new UnknownUnitException();
0079:                double n = Double.valueOf(s.substring(0, i).trim())
0080:                        .doubleValue();
0081:                String u = s.substring(i).trim().toLowerCase();
0082:                if (u.equals("literspersecond"))
0083:                    theValue = n / (1.0d / 1.0d);
0084:                else if (u.equals("litersperminute"))
0085:                    theValue = n / (1.0d / (1.0d / 60));
0086:                else if (u.equals("litersperhour"))
0087:                    theValue = n / (1.0d / (1.0d / 3600));
0088:                else if (u.equals("litersperday"))
0089:                    theValue = n / (1.0d / (1.0d / 86400));
0090:                else if (u.equals("litersperweek"))
0091:                    theValue = n / (1.0d / (1.0d / 604800));
0092:                else if (u.equals("literspermillisecond"))
0093:                    theValue = n / (1.0d / 1000);
0094:                else if (u.equals("litersperkilosecond"))
0095:                    theValue = n / (1.0d / (1.0d / 1000));
0096:                else if (u.equals("literspermonth"))
0097:                    theValue = n / (1.0d / (1.0d / 2629743.8));
0098:                else if (u.equals("litersperyear"))
0099:                    theValue = n / (1.0d / (1.0d / 31556926));
0100:                else if (u.equals("litersperfortnight"))
0101:                    theValue = n / (1.0d / (1.0d / 1209600));
0102:                else if (u.equals("ouncespersecond"))
0103:                    theValue = n / (33.814023 / 1.0d);
0104:                else if (u.equals("ouncesperminute"))
0105:                    theValue = n / (33.814023 / (1.0d / 60));
0106:                else if (u.equals("ouncesperhour"))
0107:                    theValue = n / (33.814023 / (1.0d / 3600));
0108:                else if (u.equals("ouncesperday"))
0109:                    theValue = n / (33.814023 / (1.0d / 86400));
0110:                else if (u.equals("ouncesperweek"))
0111:                    theValue = n / (33.814023 / (1.0d / 604800));
0112:                else if (u.equals("ouncespermillisecond"))
0113:                    theValue = n / (33.814023 / 1000);
0114:                else if (u.equals("ouncesperkilosecond"))
0115:                    theValue = n / (33.814023 / (1.0d / 1000));
0116:                else if (u.equals("ouncespermonth"))
0117:                    theValue = n / (33.814023 / (1.0d / 2629743.8));
0118:                else if (u.equals("ouncesperyear"))
0119:                    theValue = n / (33.814023 / (1.0d / 31556926));
0120:                else if (u.equals("ouncesperfortnight"))
0121:                    theValue = n / (33.814023 / (1.0d / 1209600));
0122:                else if (u.equals("gallonspersecond"))
0123:                    theValue = n / ((1.0d / 3.785412) / 1.0d);
0124:                else if (u.equals("gallonsperminute"))
0125:                    theValue = n / ((1.0d / 3.785412) / (1.0d / 60));
0126:                else if (u.equals("gallonsperhour"))
0127:                    theValue = n / ((1.0d / 3.785412) / (1.0d / 3600));
0128:                else if (u.equals("gallonsperday"))
0129:                    theValue = n / ((1.0d / 3.785412) / (1.0d / 86400));
0130:                else if (u.equals("gallonsperweek"))
0131:                    theValue = n / ((1.0d / 3.785412) / (1.0d / 604800));
0132:                else if (u.equals("gallonspermillisecond"))
0133:                    theValue = n / ((1.0d / 3.785412) / 1000);
0134:                else if (u.equals("gallonsperkilosecond"))
0135:                    theValue = n / ((1.0d / 3.785412) / (1.0d / 1000));
0136:                else if (u.equals("gallonspermonth"))
0137:                    theValue = n / ((1.0d / 3.785412) / (1.0d / 2629743.8));
0138:                else if (u.equals("gallonsperyear"))
0139:                    theValue = n / ((1.0d / 3.785412) / (1.0d / 31556926));
0140:                else if (u.equals("gallonsperfortnight"))
0141:                    theValue = n / ((1.0d / 3.785412) / (1.0d / 1209600));
0142:                else if (u.equals("imperialgallonspersecond"))
0143:                    theValue = n / ((1.0d / 4.546090) / 1.0d);
0144:                else if (u.equals("imperialgallonsperminute"))
0145:                    theValue = n / ((1.0d / 4.546090) / (1.0d / 60));
0146:                else if (u.equals("imperialgallonsperhour"))
0147:                    theValue = n / ((1.0d / 4.546090) / (1.0d / 3600));
0148:                else if (u.equals("imperialgallonsperday"))
0149:                    theValue = n / ((1.0d / 4.546090) / (1.0d / 86400));
0150:                else if (u.equals("imperialgallonsperweek"))
0151:                    theValue = n / ((1.0d / 4.546090) / (1.0d / 604800));
0152:                else if (u.equals("imperialgallonspermillisecond"))
0153:                    theValue = n / ((1.0d / 4.546090) / 1000);
0154:                else if (u.equals("imperialgallonsperkilosecond"))
0155:                    theValue = n / ((1.0d / 4.546090) / (1.0d / 1000));
0156:                else if (u.equals("imperialgallonspermonth"))
0157:                    theValue = n / ((1.0d / 4.546090) / (1.0d / 2629743.8));
0158:                else if (u.equals("imperialgallonsperyear"))
0159:                    theValue = n / ((1.0d / 4.546090) / (1.0d / 31556926));
0160:                else if (u.equals("imperialgallonsperfortnight"))
0161:                    theValue = n / ((1.0d / 4.546090) / (1.0d / 1209600));
0162:                else if (u.equals("cubicfeetpersecond"))
0163:                    theValue = n / ((1.0d / 28.316847) / 1.0d);
0164:                else if (u.equals("cubicfeetperminute"))
0165:                    theValue = n / ((1.0d / 28.316847) / (1.0d / 60));
0166:                else if (u.equals("cubicfeetperhour"))
0167:                    theValue = n / ((1.0d / 28.316847) / (1.0d / 3600));
0168:                else if (u.equals("cubicfeetperday"))
0169:                    theValue = n / ((1.0d / 28.316847) / (1.0d / 86400));
0170:                else if (u.equals("cubicfeetperweek"))
0171:                    theValue = n / ((1.0d / 28.316847) / (1.0d / 604800));
0172:                else if (u.equals("cubicfeetpermillisecond"))
0173:                    theValue = n / ((1.0d / 28.316847) / 1000);
0174:                else if (u.equals("cubicfeetperkilosecond"))
0175:                    theValue = n / ((1.0d / 28.316847) / (1.0d / 1000));
0176:                else if (u.equals("cubicfeetpermonth"))
0177:                    theValue = n / ((1.0d / 28.316847) / (1.0d / 2629743.8));
0178:                else if (u.equals("cubicfeetperyear"))
0179:                    theValue = n / ((1.0d / 28.316847) / (1.0d / 31556926));
0180:                else if (u.equals("cubicfeetperfortnight"))
0181:                    theValue = n / ((1.0d / 28.316847) / (1.0d / 1209600));
0182:                else if (u.equals("cubicyardspersecond"))
0183:                    theValue = n / ((1.0d / 764.55486) / 1.0d);
0184:                else if (u.equals("cubicyardsperminute"))
0185:                    theValue = n / ((1.0d / 764.55486) / (1.0d / 60));
0186:                else if (u.equals("cubicyardsperhour"))
0187:                    theValue = n / ((1.0d / 764.55486) / (1.0d / 3600));
0188:                else if (u.equals("cubicyardsperday"))
0189:                    theValue = n / ((1.0d / 764.55486) / (1.0d / 86400));
0190:                else if (u.equals("cubicyardsperweek"))
0191:                    theValue = n / ((1.0d / 764.55486) / (1.0d / 604800));
0192:                else if (u.equals("cubicyardspermillisecond"))
0193:                    theValue = n / ((1.0d / 764.55486) / 1000);
0194:                else if (u.equals("cubicyardsperkilosecond"))
0195:                    theValue = n / ((1.0d / 764.55486) / (1.0d / 1000));
0196:                else if (u.equals("cubicyardspermonth"))
0197:                    theValue = n / ((1.0d / 764.55486) / (1.0d / 2629743.8));
0198:                else if (u.equals("cubicyardsperyear"))
0199:                    theValue = n / ((1.0d / 764.55486) / (1.0d / 31556926));
0200:                else if (u.equals("cubicyardsperfortnight"))
0201:                    theValue = n / ((1.0d / 764.55486) / (1.0d / 1209600));
0202:                else if (u.equals("mtonspersecond"))
0203:                    theValue = n / ((1.0d / 1132.67388) / 1.0d);
0204:                else if (u.equals("mtonsperminute"))
0205:                    theValue = n / ((1.0d / 1132.67388) / (1.0d / 60));
0206:                else if (u.equals("mtonsperhour"))
0207:                    theValue = n / ((1.0d / 1132.67388) / (1.0d / 3600));
0208:                else if (u.equals("mtonsperday"))
0209:                    theValue = n / ((1.0d / 1132.67388) / (1.0d / 86400));
0210:                else if (u.equals("mtonsperweek"))
0211:                    theValue = n / ((1.0d / 1132.67388) / (1.0d / 604800));
0212:                else if (u.equals("mtonspermillisecond"))
0213:                    theValue = n / ((1.0d / 1132.67388) / 1000);
0214:                else if (u.equals("mtonsperkilosecond"))
0215:                    theValue = n / ((1.0d / 1132.67388) / (1.0d / 1000));
0216:                else if (u.equals("mtonspermonth"))
0217:                    theValue = n / ((1.0d / 1132.67388) / (1.0d / 2629743.8));
0218:                else if (u.equals("mtonsperyear"))
0219:                    theValue = n / ((1.0d / 1132.67388) / (1.0d / 31556926));
0220:                else if (u.equals("mtonsperfortnight"))
0221:                    theValue = n / ((1.0d / 1132.67388) / (1.0d / 1209600));
0222:                else if (u.equals("cubiccentimeterspersecond"))
0223:                    theValue = n / (1000 / 1.0d);
0224:                else if (u.equals("cubiccentimetersperminute"))
0225:                    theValue = n / (1000 / (1.0d / 60));
0226:                else if (u.equals("cubiccentimetersperhour"))
0227:                    theValue = n / (1000 / (1.0d / 3600));
0228:                else if (u.equals("cubiccentimetersperday"))
0229:                    theValue = n / (1000 / (1.0d / 86400));
0230:                else if (u.equals("cubiccentimetersperweek"))
0231:                    theValue = n / (1000 / (1.0d / 604800));
0232:                else if (u.equals("cubiccentimeterspermillisecond"))
0233:                    theValue = n / (1000 / 1000);
0234:                else if (u.equals("cubiccentimetersperkilosecond"))
0235:                    theValue = n / (1000 / (1.0d / 1000));
0236:                else if (u.equals("cubiccentimeterspermonth"))
0237:                    theValue = n / (1000 / (1.0d / 2629743.8));
0238:                else if (u.equals("cubiccentimetersperyear"))
0239:                    theValue = n / (1000 / (1.0d / 31556926));
0240:                else if (u.equals("cubiccentimetersperfortnight"))
0241:                    theValue = n / (1000 / (1.0d / 1209600));
0242:                else if (u.equals("cubicmeterspersecond"))
0243:                    theValue = n / ((1.0d / 1000) / 1.0d);
0244:                else if (u.equals("cubicmetersperminute"))
0245:                    theValue = n / ((1.0d / 1000) / (1.0d / 60));
0246:                else if (u.equals("cubicmetersperhour"))
0247:                    theValue = n / ((1.0d / 1000) / (1.0d / 3600));
0248:                else if (u.equals("cubicmetersperday"))
0249:                    theValue = n / ((1.0d / 1000) / (1.0d / 86400));
0250:                else if (u.equals("cubicmetersperweek"))
0251:                    theValue = n / ((1.0d / 1000) / (1.0d / 604800));
0252:                else if (u.equals("cubicmeterspermillisecond"))
0253:                    theValue = n / ((1.0d / 1000) / 1000);
0254:                else if (u.equals("cubicmetersperkilosecond"))
0255:                    theValue = n / ((1.0d / 1000) / (1.0d / 1000));
0256:                else if (u.equals("cubicmeterspermonth"))
0257:                    theValue = n / ((1.0d / 1000) / (1.0d / 2629743.8));
0258:                else if (u.equals("cubicmetersperyear"))
0259:                    theValue = n / ((1.0d / 1000) / (1.0d / 31556926));
0260:                else if (u.equals("cubicmetersperfortnight"))
0261:                    theValue = n / ((1.0d / 1000) / (1.0d / 1209600));
0262:                else if (u.equals("barrelspersecond"))
0263:                    theValue = n / ((1.0d / 158.98729) / 1.0d);
0264:                else if (u.equals("barrelsperminute"))
0265:                    theValue = n / ((1.0d / 158.98729) / (1.0d / 60));
0266:                else if (u.equals("barrelsperhour"))
0267:                    theValue = n / ((1.0d / 158.98729) / (1.0d / 3600));
0268:                else if (u.equals("barrelsperday"))
0269:                    theValue = n / ((1.0d / 158.98729) / (1.0d / 86400));
0270:                else if (u.equals("barrelsperweek"))
0271:                    theValue = n / ((1.0d / 158.98729) / (1.0d / 604800));
0272:                else if (u.equals("barrelspermillisecond"))
0273:                    theValue = n / ((1.0d / 158.98729) / 1000);
0274:                else if (u.equals("barrelsperkilosecond"))
0275:                    theValue = n / ((1.0d / 158.98729) / (1.0d / 1000));
0276:                else if (u.equals("barrelspermonth"))
0277:                    theValue = n / ((1.0d / 158.98729) / (1.0d / 2629743.8));
0278:                else if (u.equals("barrelsperyear"))
0279:                    theValue = n / ((1.0d / 158.98729) / (1.0d / 31556926));
0280:                else if (u.equals("barrelsperfortnight"))
0281:                    theValue = n / ((1.0d / 158.98729) / (1.0d / 1209600));
0282:                else
0283:                    throw new UnknownUnitException();
0284:            }
0285:
0286:            // TypeNamed factory methods
0287:            public static final FlowRate newLitersPerSecond(double v) {
0288:                return new FlowRate(v * (1.0d / (1.0d / 1.0d)));
0289:            }
0290:
0291:            public static final FlowRate newLitersPerSecond(String s) {
0292:                return new FlowRate((Double.valueOf(s).doubleValue())
0293:                        * (1.0d / (1.0d / 1.0d)));
0294:            }
0295:
0296:            public static final FlowRate newLitersPerMinute(double v) {
0297:                return new FlowRate(v * (1.0d / (1.0d / (1.0d / 60))));
0298:            }
0299:
0300:            public static final FlowRate newLitersPerMinute(String s) {
0301:                return new FlowRate((Double.valueOf(s).doubleValue())
0302:                        * (1.0d / (1.0d / (1.0d / 60))));
0303:            }
0304:
0305:            public static final FlowRate newLitersPerHour(double v) {
0306:                return new FlowRate(v * (1.0d / (1.0d / (1.0d / 3600))));
0307:            }
0308:
0309:            public static final FlowRate newLitersPerHour(String s) {
0310:                return new FlowRate((Double.valueOf(s).doubleValue())
0311:                        * (1.0d / (1.0d / (1.0d / 3600))));
0312:            }
0313:
0314:            public static final FlowRate newLitersPerDay(double v) {
0315:                return new FlowRate(v * (1.0d / (1.0d / (1.0d / 86400))));
0316:            }
0317:
0318:            public static final FlowRate newLitersPerDay(String s) {
0319:                return new FlowRate((Double.valueOf(s).doubleValue())
0320:                        * (1.0d / (1.0d / (1.0d / 86400))));
0321:            }
0322:
0323:            public static final FlowRate newLitersPerWeek(double v) {
0324:                return new FlowRate(v * (1.0d / (1.0d / (1.0d / 604800))));
0325:            }
0326:
0327:            public static final FlowRate newLitersPerWeek(String s) {
0328:                return new FlowRate((Double.valueOf(s).doubleValue())
0329:                        * (1.0d / (1.0d / (1.0d / 604800))));
0330:            }
0331:
0332:            public static final FlowRate newLitersPerMillisecond(double v) {
0333:                return new FlowRate(v * (1.0d / (1.0d / 1000)));
0334:            }
0335:
0336:            public static final FlowRate newLitersPerMillisecond(String s) {
0337:                return new FlowRate((Double.valueOf(s).doubleValue())
0338:                        * (1.0d / (1.0d / 1000)));
0339:            }
0340:
0341:            public static final FlowRate newLitersPerKilosecond(double v) {
0342:                return new FlowRate(v * (1.0d / (1.0d / (1.0d / 1000))));
0343:            }
0344:
0345:            public static final FlowRate newLitersPerKilosecond(String s) {
0346:                return new FlowRate((Double.valueOf(s).doubleValue())
0347:                        * (1.0d / (1.0d / (1.0d / 1000))));
0348:            }
0349:
0350:            public static final FlowRate newLitersPerMonth(double v) {
0351:                return new FlowRate(v * (1.0d / (1.0d / (1.0d / 2629743.8))));
0352:            }
0353:
0354:            public static final FlowRate newLitersPerMonth(String s) {
0355:                return new FlowRate((Double.valueOf(s).doubleValue())
0356:                        * (1.0d / (1.0d / (1.0d / 2629743.8))));
0357:            }
0358:
0359:            public static final FlowRate newLitersPerYear(double v) {
0360:                return new FlowRate(v * (1.0d / (1.0d / (1.0d / 31556926))));
0361:            }
0362:
0363:            public static final FlowRate newLitersPerYear(String s) {
0364:                return new FlowRate((Double.valueOf(s).doubleValue())
0365:                        * (1.0d / (1.0d / (1.0d / 31556926))));
0366:            }
0367:
0368:            public static final FlowRate newLitersPerFortnight(double v) {
0369:                return new FlowRate(v * (1.0d / (1.0d / (1.0d / 1209600))));
0370:            }
0371:
0372:            public static final FlowRate newLitersPerFortnight(String s) {
0373:                return new FlowRate((Double.valueOf(s).doubleValue())
0374:                        * (1.0d / (1.0d / (1.0d / 1209600))));
0375:            }
0376:
0377:            public static final FlowRate newOuncesPerSecond(double v) {
0378:                return new FlowRate(v * (1.0d / (33.814023 / 1.0d)));
0379:            }
0380:
0381:            public static final FlowRate newOuncesPerSecond(String s) {
0382:                return new FlowRate((Double.valueOf(s).doubleValue())
0383:                        * (1.0d / (33.814023 / 1.0d)));
0384:            }
0385:
0386:            public static final FlowRate newOuncesPerMinute(double v) {
0387:                return new FlowRate(v * (1.0d / (33.814023 / (1.0d / 60))));
0388:            }
0389:
0390:            public static final FlowRate newOuncesPerMinute(String s) {
0391:                return new FlowRate((Double.valueOf(s).doubleValue())
0392:                        * (1.0d / (33.814023 / (1.0d / 60))));
0393:            }
0394:
0395:            public static final FlowRate newOuncesPerHour(double v) {
0396:                return new FlowRate(v * (1.0d / (33.814023 / (1.0d / 3600))));
0397:            }
0398:
0399:            public static final FlowRate newOuncesPerHour(String s) {
0400:                return new FlowRate((Double.valueOf(s).doubleValue())
0401:                        * (1.0d / (33.814023 / (1.0d / 3600))));
0402:            }
0403:
0404:            public static final FlowRate newOuncesPerDay(double v) {
0405:                return new FlowRate(v * (1.0d / (33.814023 / (1.0d / 86400))));
0406:            }
0407:
0408:            public static final FlowRate newOuncesPerDay(String s) {
0409:                return new FlowRate((Double.valueOf(s).doubleValue())
0410:                        * (1.0d / (33.814023 / (1.0d / 86400))));
0411:            }
0412:
0413:            public static final FlowRate newOuncesPerWeek(double v) {
0414:                return new FlowRate(v * (1.0d / (33.814023 / (1.0d / 604800))));
0415:            }
0416:
0417:            public static final FlowRate newOuncesPerWeek(String s) {
0418:                return new FlowRate((Double.valueOf(s).doubleValue())
0419:                        * (1.0d / (33.814023 / (1.0d / 604800))));
0420:            }
0421:
0422:            public static final FlowRate newOuncesPerMillisecond(double v) {
0423:                return new FlowRate(v * (1.0d / (33.814023 / 1000)));
0424:            }
0425:
0426:            public static final FlowRate newOuncesPerMillisecond(String s) {
0427:                return new FlowRate((Double.valueOf(s).doubleValue())
0428:                        * (1.0d / (33.814023 / 1000)));
0429:            }
0430:
0431:            public static final FlowRate newOuncesPerKilosecond(double v) {
0432:                return new FlowRate(v * (1.0d / (33.814023 / (1.0d / 1000))));
0433:            }
0434:
0435:            public static final FlowRate newOuncesPerKilosecond(String s) {
0436:                return new FlowRate((Double.valueOf(s).doubleValue())
0437:                        * (1.0d / (33.814023 / (1.0d / 1000))));
0438:            }
0439:
0440:            public static final FlowRate newOuncesPerMonth(double v) {
0441:                return new FlowRate(v
0442:                        * (1.0d / (33.814023 / (1.0d / 2629743.8))));
0443:            }
0444:
0445:            public static final FlowRate newOuncesPerMonth(String s) {
0446:                return new FlowRate((Double.valueOf(s).doubleValue())
0447:                        * (1.0d / (33.814023 / (1.0d / 2629743.8))));
0448:            }
0449:
0450:            public static final FlowRate newOuncesPerYear(double v) {
0451:                return new FlowRate(v
0452:                        * (1.0d / (33.814023 / (1.0d / 31556926))));
0453:            }
0454:
0455:            public static final FlowRate newOuncesPerYear(String s) {
0456:                return new FlowRate((Double.valueOf(s).doubleValue())
0457:                        * (1.0d / (33.814023 / (1.0d / 31556926))));
0458:            }
0459:
0460:            public static final FlowRate newOuncesPerFortnight(double v) {
0461:                return new FlowRate(v * (1.0d / (33.814023 / (1.0d / 1209600))));
0462:            }
0463:
0464:            public static final FlowRate newOuncesPerFortnight(String s) {
0465:                return new FlowRate((Double.valueOf(s).doubleValue())
0466:                        * (1.0d / (33.814023 / (1.0d / 1209600))));
0467:            }
0468:
0469:            public static final FlowRate newGallonsPerSecond(double v) {
0470:                return new FlowRate(v * (1.0d / ((1.0d / 3.785412) / 1.0d)));
0471:            }
0472:
0473:            public static final FlowRate newGallonsPerSecond(String s) {
0474:                return new FlowRate((Double.valueOf(s).doubleValue())
0475:                        * (1.0d / ((1.0d / 3.785412) / 1.0d)));
0476:            }
0477:
0478:            public static final FlowRate newGallonsPerMinute(double v) {
0479:                return new FlowRate(v
0480:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 60))));
0481:            }
0482:
0483:            public static final FlowRate newGallonsPerMinute(String s) {
0484:                return new FlowRate((Double.valueOf(s).doubleValue())
0485:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 60))));
0486:            }
0487:
0488:            public static final FlowRate newGallonsPerHour(double v) {
0489:                return new FlowRate(v
0490:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 3600))));
0491:            }
0492:
0493:            public static final FlowRate newGallonsPerHour(String s) {
0494:                return new FlowRate((Double.valueOf(s).doubleValue())
0495:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 3600))));
0496:            }
0497:
0498:            public static final FlowRate newGallonsPerDay(double v) {
0499:                return new FlowRate(v
0500:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 86400))));
0501:            }
0502:
0503:            public static final FlowRate newGallonsPerDay(String s) {
0504:                return new FlowRate((Double.valueOf(s).doubleValue())
0505:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 86400))));
0506:            }
0507:
0508:            public static final FlowRate newGallonsPerWeek(double v) {
0509:                return new FlowRate(v
0510:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 604800))));
0511:            }
0512:
0513:            public static final FlowRate newGallonsPerWeek(String s) {
0514:                return new FlowRate((Double.valueOf(s).doubleValue())
0515:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 604800))));
0516:            }
0517:
0518:            public static final FlowRate newGallonsPerMillisecond(double v) {
0519:                return new FlowRate(v * (1.0d / ((1.0d / 3.785412) / 1000)));
0520:            }
0521:
0522:            public static final FlowRate newGallonsPerMillisecond(String s) {
0523:                return new FlowRate((Double.valueOf(s).doubleValue())
0524:                        * (1.0d / ((1.0d / 3.785412) / 1000)));
0525:            }
0526:
0527:            public static final FlowRate newGallonsPerKilosecond(double v) {
0528:                return new FlowRate(v
0529:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 1000))));
0530:            }
0531:
0532:            public static final FlowRate newGallonsPerKilosecond(String s) {
0533:                return new FlowRate((Double.valueOf(s).doubleValue())
0534:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 1000))));
0535:            }
0536:
0537:            public static final FlowRate newGallonsPerMonth(double v) {
0538:                return new FlowRate(v
0539:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 2629743.8))));
0540:            }
0541:
0542:            public static final FlowRate newGallonsPerMonth(String s) {
0543:                return new FlowRate((Double.valueOf(s).doubleValue())
0544:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 2629743.8))));
0545:            }
0546:
0547:            public static final FlowRate newGallonsPerYear(double v) {
0548:                return new FlowRate(v
0549:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 31556926))));
0550:            }
0551:
0552:            public static final FlowRate newGallonsPerYear(String s) {
0553:                return new FlowRate((Double.valueOf(s).doubleValue())
0554:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 31556926))));
0555:            }
0556:
0557:            public static final FlowRate newGallonsPerFortnight(double v) {
0558:                return new FlowRate(v
0559:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 1209600))));
0560:            }
0561:
0562:            public static final FlowRate newGallonsPerFortnight(String s) {
0563:                return new FlowRate((Double.valueOf(s).doubleValue())
0564:                        * (1.0d / ((1.0d / 3.785412) / (1.0d / 1209600))));
0565:            }
0566:
0567:            public static final FlowRate newImperialGallonsPerSecond(double v) {
0568:                return new FlowRate(v * (1.0d / ((1.0d / 4.546090) / 1.0d)));
0569:            }
0570:
0571:            public static final FlowRate newImperialGallonsPerSecond(String s) {
0572:                return new FlowRate((Double.valueOf(s).doubleValue())
0573:                        * (1.0d / ((1.0d / 4.546090) / 1.0d)));
0574:            }
0575:
0576:            public static final FlowRate newImperialGallonsPerMinute(double v) {
0577:                return new FlowRate(v
0578:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 60))));
0579:            }
0580:
0581:            public static final FlowRate newImperialGallonsPerMinute(String s) {
0582:                return new FlowRate((Double.valueOf(s).doubleValue())
0583:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 60))));
0584:            }
0585:
0586:            public static final FlowRate newImperialGallonsPerHour(double v) {
0587:                return new FlowRate(v
0588:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 3600))));
0589:            }
0590:
0591:            public static final FlowRate newImperialGallonsPerHour(String s) {
0592:                return new FlowRate((Double.valueOf(s).doubleValue())
0593:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 3600))));
0594:            }
0595:
0596:            public static final FlowRate newImperialGallonsPerDay(double v) {
0597:                return new FlowRate(v
0598:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 86400))));
0599:            }
0600:
0601:            public static final FlowRate newImperialGallonsPerDay(String s) {
0602:                return new FlowRate((Double.valueOf(s).doubleValue())
0603:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 86400))));
0604:            }
0605:
0606:            public static final FlowRate newImperialGallonsPerWeek(double v) {
0607:                return new FlowRate(v
0608:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 604800))));
0609:            }
0610:
0611:            public static final FlowRate newImperialGallonsPerWeek(String s) {
0612:                return new FlowRate((Double.valueOf(s).doubleValue())
0613:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 604800))));
0614:            }
0615:
0616:            public static final FlowRate newImperialGallonsPerMillisecond(
0617:                    double v) {
0618:                return new FlowRate(v * (1.0d / ((1.0d / 4.546090) / 1000)));
0619:            }
0620:
0621:            public static final FlowRate newImperialGallonsPerMillisecond(
0622:                    String s) {
0623:                return new FlowRate((Double.valueOf(s).doubleValue())
0624:                        * (1.0d / ((1.0d / 4.546090) / 1000)));
0625:            }
0626:
0627:            public static final FlowRate newImperialGallonsPerKilosecond(
0628:                    double v) {
0629:                return new FlowRate(v
0630:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 1000))));
0631:            }
0632:
0633:            public static final FlowRate newImperialGallonsPerKilosecond(
0634:                    String s) {
0635:                return new FlowRate((Double.valueOf(s).doubleValue())
0636:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 1000))));
0637:            }
0638:
0639:            public static final FlowRate newImperialGallonsPerMonth(double v) {
0640:                return new FlowRate(v
0641:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 2629743.8))));
0642:            }
0643:
0644:            public static final FlowRate newImperialGallonsPerMonth(String s) {
0645:                return new FlowRate((Double.valueOf(s).doubleValue())
0646:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 2629743.8))));
0647:            }
0648:
0649:            public static final FlowRate newImperialGallonsPerYear(double v) {
0650:                return new FlowRate(v
0651:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 31556926))));
0652:            }
0653:
0654:            public static final FlowRate newImperialGallonsPerYear(String s) {
0655:                return new FlowRate((Double.valueOf(s).doubleValue())
0656:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 31556926))));
0657:            }
0658:
0659:            public static final FlowRate newImperialGallonsPerFortnight(double v) {
0660:                return new FlowRate(v
0661:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 1209600))));
0662:            }
0663:
0664:            public static final FlowRate newImperialGallonsPerFortnight(String s) {
0665:                return new FlowRate((Double.valueOf(s).doubleValue())
0666:                        * (1.0d / ((1.0d / 4.546090) / (1.0d / 1209600))));
0667:            }
0668:
0669:            public static final FlowRate newCubicFeetPerSecond(double v) {
0670:                return new FlowRate(v * (1.0d / ((1.0d / 28.316847) / 1.0d)));
0671:            }
0672:
0673:            public static final FlowRate newCubicFeetPerSecond(String s) {
0674:                return new FlowRate((Double.valueOf(s).doubleValue())
0675:                        * (1.0d / ((1.0d / 28.316847) / 1.0d)));
0676:            }
0677:
0678:            public static final FlowRate newCubicFeetPerMinute(double v) {
0679:                return new FlowRate(v
0680:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 60))));
0681:            }
0682:
0683:            public static final FlowRate newCubicFeetPerMinute(String s) {
0684:                return new FlowRate((Double.valueOf(s).doubleValue())
0685:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 60))));
0686:            }
0687:
0688:            public static final FlowRate newCubicFeetPerHour(double v) {
0689:                return new FlowRate(v
0690:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 3600))));
0691:            }
0692:
0693:            public static final FlowRate newCubicFeetPerHour(String s) {
0694:                return new FlowRate((Double.valueOf(s).doubleValue())
0695:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 3600))));
0696:            }
0697:
0698:            public static final FlowRate newCubicFeetPerDay(double v) {
0699:                return new FlowRate(v
0700:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 86400))));
0701:            }
0702:
0703:            public static final FlowRate newCubicFeetPerDay(String s) {
0704:                return new FlowRate((Double.valueOf(s).doubleValue())
0705:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 86400))));
0706:            }
0707:
0708:            public static final FlowRate newCubicFeetPerWeek(double v) {
0709:                return new FlowRate(v
0710:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 604800))));
0711:            }
0712:
0713:            public static final FlowRate newCubicFeetPerWeek(String s) {
0714:                return new FlowRate((Double.valueOf(s).doubleValue())
0715:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 604800))));
0716:            }
0717:
0718:            public static final FlowRate newCubicFeetPerMillisecond(double v) {
0719:                return new FlowRate(v * (1.0d / ((1.0d / 28.316847) / 1000)));
0720:            }
0721:
0722:            public static final FlowRate newCubicFeetPerMillisecond(String s) {
0723:                return new FlowRate((Double.valueOf(s).doubleValue())
0724:                        * (1.0d / ((1.0d / 28.316847) / 1000)));
0725:            }
0726:
0727:            public static final FlowRate newCubicFeetPerKilosecond(double v) {
0728:                return new FlowRate(v
0729:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 1000))));
0730:            }
0731:
0732:            public static final FlowRate newCubicFeetPerKilosecond(String s) {
0733:                return new FlowRate((Double.valueOf(s).doubleValue())
0734:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 1000))));
0735:            }
0736:
0737:            public static final FlowRate newCubicFeetPerMonth(double v) {
0738:                return new FlowRate(v
0739:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 2629743.8))));
0740:            }
0741:
0742:            public static final FlowRate newCubicFeetPerMonth(String s) {
0743:                return new FlowRate((Double.valueOf(s).doubleValue())
0744:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 2629743.8))));
0745:            }
0746:
0747:            public static final FlowRate newCubicFeetPerYear(double v) {
0748:                return new FlowRate(v
0749:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 31556926))));
0750:            }
0751:
0752:            public static final FlowRate newCubicFeetPerYear(String s) {
0753:                return new FlowRate((Double.valueOf(s).doubleValue())
0754:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 31556926))));
0755:            }
0756:
0757:            public static final FlowRate newCubicFeetPerFortnight(double v) {
0758:                return new FlowRate(v
0759:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 1209600))));
0760:            }
0761:
0762:            public static final FlowRate newCubicFeetPerFortnight(String s) {
0763:                return new FlowRate((Double.valueOf(s).doubleValue())
0764:                        * (1.0d / ((1.0d / 28.316847) / (1.0d / 1209600))));
0765:            }
0766:
0767:            public static final FlowRate newCubicYardsPerSecond(double v) {
0768:                return new FlowRate(v * (1.0d / ((1.0d / 764.55486) / 1.0d)));
0769:            }
0770:
0771:            public static final FlowRate newCubicYardsPerSecond(String s) {
0772:                return new FlowRate((Double.valueOf(s).doubleValue())
0773:                        * (1.0d / ((1.0d / 764.55486) / 1.0d)));
0774:            }
0775:
0776:            public static final FlowRate newCubicYardsPerMinute(double v) {
0777:                return new FlowRate(v
0778:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 60))));
0779:            }
0780:
0781:            public static final FlowRate newCubicYardsPerMinute(String s) {
0782:                return new FlowRate((Double.valueOf(s).doubleValue())
0783:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 60))));
0784:            }
0785:
0786:            public static final FlowRate newCubicYardsPerHour(double v) {
0787:                return new FlowRate(v
0788:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 3600))));
0789:            }
0790:
0791:            public static final FlowRate newCubicYardsPerHour(String s) {
0792:                return new FlowRate((Double.valueOf(s).doubleValue())
0793:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 3600))));
0794:            }
0795:
0796:            public static final FlowRate newCubicYardsPerDay(double v) {
0797:                return new FlowRate(v
0798:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 86400))));
0799:            }
0800:
0801:            public static final FlowRate newCubicYardsPerDay(String s) {
0802:                return new FlowRate((Double.valueOf(s).doubleValue())
0803:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 86400))));
0804:            }
0805:
0806:            public static final FlowRate newCubicYardsPerWeek(double v) {
0807:                return new FlowRate(v
0808:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 604800))));
0809:            }
0810:
0811:            public static final FlowRate newCubicYardsPerWeek(String s) {
0812:                return new FlowRate((Double.valueOf(s).doubleValue())
0813:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 604800))));
0814:            }
0815:
0816:            public static final FlowRate newCubicYardsPerMillisecond(double v) {
0817:                return new FlowRate(v * (1.0d / ((1.0d / 764.55486) / 1000)));
0818:            }
0819:
0820:            public static final FlowRate newCubicYardsPerMillisecond(String s) {
0821:                return new FlowRate((Double.valueOf(s).doubleValue())
0822:                        * (1.0d / ((1.0d / 764.55486) / 1000)));
0823:            }
0824:
0825:            public static final FlowRate newCubicYardsPerKilosecond(double v) {
0826:                return new FlowRate(v
0827:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 1000))));
0828:            }
0829:
0830:            public static final FlowRate newCubicYardsPerKilosecond(String s) {
0831:                return new FlowRate((Double.valueOf(s).doubleValue())
0832:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 1000))));
0833:            }
0834:
0835:            public static final FlowRate newCubicYardsPerMonth(double v) {
0836:                return new FlowRate(v
0837:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 2629743.8))));
0838:            }
0839:
0840:            public static final FlowRate newCubicYardsPerMonth(String s) {
0841:                return new FlowRate((Double.valueOf(s).doubleValue())
0842:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 2629743.8))));
0843:            }
0844:
0845:            public static final FlowRate newCubicYardsPerYear(double v) {
0846:                return new FlowRate(v
0847:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 31556926))));
0848:            }
0849:
0850:            public static final FlowRate newCubicYardsPerYear(String s) {
0851:                return new FlowRate((Double.valueOf(s).doubleValue())
0852:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 31556926))));
0853:            }
0854:
0855:            public static final FlowRate newCubicYardsPerFortnight(double v) {
0856:                return new FlowRate(v
0857:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 1209600))));
0858:            }
0859:
0860:            public static final FlowRate newCubicYardsPerFortnight(String s) {
0861:                return new FlowRate((Double.valueOf(s).doubleValue())
0862:                        * (1.0d / ((1.0d / 764.55486) / (1.0d / 1209600))));
0863:            }
0864:
0865:            public static final FlowRate newMtonsPerSecond(double v) {
0866:                return new FlowRate(v * (1.0d / ((1.0d / 1132.67388) / 1.0d)));
0867:            }
0868:
0869:            public static final FlowRate newMtonsPerSecond(String s) {
0870:                return new FlowRate((Double.valueOf(s).doubleValue())
0871:                        * (1.0d / ((1.0d / 1132.67388) / 1.0d)));
0872:            }
0873:
0874:            public static final FlowRate newMtonsPerMinute(double v) {
0875:                return new FlowRate(v
0876:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 60))));
0877:            }
0878:
0879:            public static final FlowRate newMtonsPerMinute(String s) {
0880:                return new FlowRate((Double.valueOf(s).doubleValue())
0881:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 60))));
0882:            }
0883:
0884:            public static final FlowRate newMtonsPerHour(double v) {
0885:                return new FlowRate(v
0886:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 3600))));
0887:            }
0888:
0889:            public static final FlowRate newMtonsPerHour(String s) {
0890:                return new FlowRate((Double.valueOf(s).doubleValue())
0891:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 3600))));
0892:            }
0893:
0894:            public static final FlowRate newMtonsPerDay(double v) {
0895:                return new FlowRate(v
0896:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 86400))));
0897:            }
0898:
0899:            public static final FlowRate newMtonsPerDay(String s) {
0900:                return new FlowRate((Double.valueOf(s).doubleValue())
0901:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 86400))));
0902:            }
0903:
0904:            public static final FlowRate newMtonsPerWeek(double v) {
0905:                return new FlowRate(v
0906:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 604800))));
0907:            }
0908:
0909:            public static final FlowRate newMtonsPerWeek(String s) {
0910:                return new FlowRate((Double.valueOf(s).doubleValue())
0911:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 604800))));
0912:            }
0913:
0914:            public static final FlowRate newMtonsPerMillisecond(double v) {
0915:                return new FlowRate(v * (1.0d / ((1.0d / 1132.67388) / 1000)));
0916:            }
0917:
0918:            public static final FlowRate newMtonsPerMillisecond(String s) {
0919:                return new FlowRate((Double.valueOf(s).doubleValue())
0920:                        * (1.0d / ((1.0d / 1132.67388) / 1000)));
0921:            }
0922:
0923:            public static final FlowRate newMtonsPerKilosecond(double v) {
0924:                return new FlowRate(v
0925:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 1000))));
0926:            }
0927:
0928:            public static final FlowRate newMtonsPerKilosecond(String s) {
0929:                return new FlowRate((Double.valueOf(s).doubleValue())
0930:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 1000))));
0931:            }
0932:
0933:            public static final FlowRate newMtonsPerMonth(double v) {
0934:                return new FlowRate(v
0935:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 2629743.8))));
0936:            }
0937:
0938:            public static final FlowRate newMtonsPerMonth(String s) {
0939:                return new FlowRate((Double.valueOf(s).doubleValue())
0940:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 2629743.8))));
0941:            }
0942:
0943:            public static final FlowRate newMtonsPerYear(double v) {
0944:                return new FlowRate(v
0945:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 31556926))));
0946:            }
0947:
0948:            public static final FlowRate newMtonsPerYear(String s) {
0949:                return new FlowRate((Double.valueOf(s).doubleValue())
0950:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 31556926))));
0951:            }
0952:
0953:            public static final FlowRate newMtonsPerFortnight(double v) {
0954:                return new FlowRate(v
0955:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 1209600))));
0956:            }
0957:
0958:            public static final FlowRate newMtonsPerFortnight(String s) {
0959:                return new FlowRate((Double.valueOf(s).doubleValue())
0960:                        * (1.0d / ((1.0d / 1132.67388) / (1.0d / 1209600))));
0961:            }
0962:
0963:            public static final FlowRate newCubicCentimetersPerSecond(double v) {
0964:                return new FlowRate(v * (1.0d / (1000 / 1.0d)));
0965:            }
0966:
0967:            public static final FlowRate newCubicCentimetersPerSecond(String s) {
0968:                return new FlowRate((Double.valueOf(s).doubleValue())
0969:                        * (1.0d / (1000 / 1.0d)));
0970:            }
0971:
0972:            public static final FlowRate newCubicCentimetersPerMinute(double v) {
0973:                return new FlowRate(v * (1.0d / (1000 / (1.0d / 60))));
0974:            }
0975:
0976:            public static final FlowRate newCubicCentimetersPerMinute(String s) {
0977:                return new FlowRate((Double.valueOf(s).doubleValue())
0978:                        * (1.0d / (1000 / (1.0d / 60))));
0979:            }
0980:
0981:            public static final FlowRate newCubicCentimetersPerHour(double v) {
0982:                return new FlowRate(v * (1.0d / (1000 / (1.0d / 3600))));
0983:            }
0984:
0985:            public static final FlowRate newCubicCentimetersPerHour(String s) {
0986:                return new FlowRate((Double.valueOf(s).doubleValue())
0987:                        * (1.0d / (1000 / (1.0d / 3600))));
0988:            }
0989:
0990:            public static final FlowRate newCubicCentimetersPerDay(double v) {
0991:                return new FlowRate(v * (1.0d / (1000 / (1.0d / 86400))));
0992:            }
0993:
0994:            public static final FlowRate newCubicCentimetersPerDay(String s) {
0995:                return new FlowRate((Double.valueOf(s).doubleValue())
0996:                        * (1.0d / (1000 / (1.0d / 86400))));
0997:            }
0998:
0999:            public static final FlowRate newCubicCentimetersPerWeek(double v) {
1000:                return new FlowRate(v * (1.0d / (1000 / (1.0d / 604800))));
1001:            }
1002:
1003:            public static final FlowRate newCubicCentimetersPerWeek(String s) {
1004:                return new FlowRate((Double.valueOf(s).doubleValue())
1005:                        * (1.0d / (1000 / (1.0d / 604800))));
1006:            }
1007:
1008:            public static final FlowRate newCubicCentimetersPerMillisecond(
1009:                    double v) {
1010:                return new FlowRate(v * (1.0d / (1000 / 1000)));
1011:            }
1012:
1013:            public static final FlowRate newCubicCentimetersPerMillisecond(
1014:                    String s) {
1015:                return new FlowRate((Double.valueOf(s).doubleValue())
1016:                        * (1.0d / (1000 / 1000)));
1017:            }
1018:
1019:            public static final FlowRate newCubicCentimetersPerKilosecond(
1020:                    double v) {
1021:                return new FlowRate(v * (1.0d / (1000 / (1.0d / 1000))));
1022:            }
1023:
1024:            public static final FlowRate newCubicCentimetersPerKilosecond(
1025:                    String s) {
1026:                return new FlowRate((Double.valueOf(s).doubleValue())
1027:                        * (1.0d / (1000 / (1.0d / 1000))));
1028:            }
1029:
1030:            public static final FlowRate newCubicCentimetersPerMonth(double v) {
1031:                return new FlowRate(v * (1.0d / (1000 / (1.0d / 2629743.8))));
1032:            }
1033:
1034:            public static final FlowRate newCubicCentimetersPerMonth(String s) {
1035:                return new FlowRate((Double.valueOf(s).doubleValue())
1036:                        * (1.0d / (1000 / (1.0d / 2629743.8))));
1037:            }
1038:
1039:            public static final FlowRate newCubicCentimetersPerYear(double v) {
1040:                return new FlowRate(v * (1.0d / (1000 / (1.0d / 31556926))));
1041:            }
1042:
1043:            public static final FlowRate newCubicCentimetersPerYear(String s) {
1044:                return new FlowRate((Double.valueOf(s).doubleValue())
1045:                        * (1.0d / (1000 / (1.0d / 31556926))));
1046:            }
1047:
1048:            public static final FlowRate newCubicCentimetersPerFortnight(
1049:                    double v) {
1050:                return new FlowRate(v * (1.0d / (1000 / (1.0d / 1209600))));
1051:            }
1052:
1053:            public static final FlowRate newCubicCentimetersPerFortnight(
1054:                    String s) {
1055:                return new FlowRate((Double.valueOf(s).doubleValue())
1056:                        * (1.0d / (1000 / (1.0d / 1209600))));
1057:            }
1058:
1059:            public static final FlowRate newCubicMetersPerSecond(double v) {
1060:                return new FlowRate(v * (1.0d / ((1.0d / 1000) / 1.0d)));
1061:            }
1062:
1063:            public static final FlowRate newCubicMetersPerSecond(String s) {
1064:                return new FlowRate((Double.valueOf(s).doubleValue())
1065:                        * (1.0d / ((1.0d / 1000) / 1.0d)));
1066:            }
1067:
1068:            public static final FlowRate newCubicMetersPerMinute(double v) {
1069:                return new FlowRate(v * (1.0d / ((1.0d / 1000) / (1.0d / 60))));
1070:            }
1071:
1072:            public static final FlowRate newCubicMetersPerMinute(String s) {
1073:                return new FlowRate((Double.valueOf(s).doubleValue())
1074:                        * (1.0d / ((1.0d / 1000) / (1.0d / 60))));
1075:            }
1076:
1077:            public static final FlowRate newCubicMetersPerHour(double v) {
1078:                return new FlowRate(v
1079:                        * (1.0d / ((1.0d / 1000) / (1.0d / 3600))));
1080:            }
1081:
1082:            public static final FlowRate newCubicMetersPerHour(String s) {
1083:                return new FlowRate((Double.valueOf(s).doubleValue())
1084:                        * (1.0d / ((1.0d / 1000) / (1.0d / 3600))));
1085:            }
1086:
1087:            public static final FlowRate newCubicMetersPerDay(double v) {
1088:                return new FlowRate(v
1089:                        * (1.0d / ((1.0d / 1000) / (1.0d / 86400))));
1090:            }
1091:
1092:            public static final FlowRate newCubicMetersPerDay(String s) {
1093:                return new FlowRate((Double.valueOf(s).doubleValue())
1094:                        * (1.0d / ((1.0d / 1000) / (1.0d / 86400))));
1095:            }
1096:
1097:            public static final FlowRate newCubicMetersPerWeek(double v) {
1098:                return new FlowRate(v
1099:                        * (1.0d / ((1.0d / 1000) / (1.0d / 604800))));
1100:            }
1101:
1102:            public static final FlowRate newCubicMetersPerWeek(String s) {
1103:                return new FlowRate((Double.valueOf(s).doubleValue())
1104:                        * (1.0d / ((1.0d / 1000) / (1.0d / 604800))));
1105:            }
1106:
1107:            public static final FlowRate newCubicMetersPerMillisecond(double v) {
1108:                return new FlowRate(v * (1.0d / ((1.0d / 1000) / 1000)));
1109:            }
1110:
1111:            public static final FlowRate newCubicMetersPerMillisecond(String s) {
1112:                return new FlowRate((Double.valueOf(s).doubleValue())
1113:                        * (1.0d / ((1.0d / 1000) / 1000)));
1114:            }
1115:
1116:            public static final FlowRate newCubicMetersPerKilosecond(double v) {
1117:                return new FlowRate(v
1118:                        * (1.0d / ((1.0d / 1000) / (1.0d / 1000))));
1119:            }
1120:
1121:            public static final FlowRate newCubicMetersPerKilosecond(String s) {
1122:                return new FlowRate((Double.valueOf(s).doubleValue())
1123:                        * (1.0d / ((1.0d / 1000) / (1.0d / 1000))));
1124:            }
1125:
1126:            public static final FlowRate newCubicMetersPerMonth(double v) {
1127:                return new FlowRate(v
1128:                        * (1.0d / ((1.0d / 1000) / (1.0d / 2629743.8))));
1129:            }
1130:
1131:            public static final FlowRate newCubicMetersPerMonth(String s) {
1132:                return new FlowRate((Double.valueOf(s).doubleValue())
1133:                        * (1.0d / ((1.0d / 1000) / (1.0d / 2629743.8))));
1134:            }
1135:
1136:            public static final FlowRate newCubicMetersPerYear(double v) {
1137:                return new FlowRate(v
1138:                        * (1.0d / ((1.0d / 1000) / (1.0d / 31556926))));
1139:            }
1140:
1141:            public static final FlowRate newCubicMetersPerYear(String s) {
1142:                return new FlowRate((Double.valueOf(s).doubleValue())
1143:                        * (1.0d / ((1.0d / 1000) / (1.0d / 31556926))));
1144:            }
1145:
1146:            public static final FlowRate newCubicMetersPerFortnight(double v) {
1147:                return new FlowRate(v
1148:                        * (1.0d / ((1.0d / 1000) / (1.0d / 1209600))));
1149:            }
1150:
1151:            public static final FlowRate newCubicMetersPerFortnight(String s) {
1152:                return new FlowRate((Double.valueOf(s).doubleValue())
1153:                        * (1.0d / ((1.0d / 1000) / (1.0d / 1209600))));
1154:            }
1155:
1156:            public static final FlowRate newBarrelsPerSecond(double v) {
1157:                return new FlowRate(v * (1.0d / ((1.0d / 158.98729) / 1.0d)));
1158:            }
1159:
1160:            public static final FlowRate newBarrelsPerSecond(String s) {
1161:                return new FlowRate((Double.valueOf(s).doubleValue())
1162:                        * (1.0d / ((1.0d / 158.98729) / 1.0d)));
1163:            }
1164:
1165:            public static final FlowRate newBarrelsPerMinute(double v) {
1166:                return new FlowRate(v
1167:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 60))));
1168:            }
1169:
1170:            public static final FlowRate newBarrelsPerMinute(String s) {
1171:                return new FlowRate((Double.valueOf(s).doubleValue())
1172:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 60))));
1173:            }
1174:
1175:            public static final FlowRate newBarrelsPerHour(double v) {
1176:                return new FlowRate(v
1177:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 3600))));
1178:            }
1179:
1180:            public static final FlowRate newBarrelsPerHour(String s) {
1181:                return new FlowRate((Double.valueOf(s).doubleValue())
1182:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 3600))));
1183:            }
1184:
1185:            public static final FlowRate newBarrelsPerDay(double v) {
1186:                return new FlowRate(v
1187:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 86400))));
1188:            }
1189:
1190:            public static final FlowRate newBarrelsPerDay(String s) {
1191:                return new FlowRate((Double.valueOf(s).doubleValue())
1192:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 86400))));
1193:            }
1194:
1195:            public static final FlowRate newBarrelsPerWeek(double v) {
1196:                return new FlowRate(v
1197:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 604800))));
1198:            }
1199:
1200:            public static final FlowRate newBarrelsPerWeek(String s) {
1201:                return new FlowRate((Double.valueOf(s).doubleValue())
1202:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 604800))));
1203:            }
1204:
1205:            public static final FlowRate newBarrelsPerMillisecond(double v) {
1206:                return new FlowRate(v * (1.0d / ((1.0d / 158.98729) / 1000)));
1207:            }
1208:
1209:            public static final FlowRate newBarrelsPerMillisecond(String s) {
1210:                return new FlowRate((Double.valueOf(s).doubleValue())
1211:                        * (1.0d / ((1.0d / 158.98729) / 1000)));
1212:            }
1213:
1214:            public static final FlowRate newBarrelsPerKilosecond(double v) {
1215:                return new FlowRate(v
1216:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 1000))));
1217:            }
1218:
1219:            public static final FlowRate newBarrelsPerKilosecond(String s) {
1220:                return new FlowRate((Double.valueOf(s).doubleValue())
1221:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 1000))));
1222:            }
1223:
1224:            public static final FlowRate newBarrelsPerMonth(double v) {
1225:                return new FlowRate(v
1226:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 2629743.8))));
1227:            }
1228:
1229:            public static final FlowRate newBarrelsPerMonth(String s) {
1230:                return new FlowRate((Double.valueOf(s).doubleValue())
1231:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 2629743.8))));
1232:            }
1233:
1234:            public static final FlowRate newBarrelsPerYear(double v) {
1235:                return new FlowRate(v
1236:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 31556926))));
1237:            }
1238:
1239:            public static final FlowRate newBarrelsPerYear(String s) {
1240:                return new FlowRate((Double.valueOf(s).doubleValue())
1241:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 31556926))));
1242:            }
1243:
1244:            public static final FlowRate newBarrelsPerFortnight(double v) {
1245:                return new FlowRate(v
1246:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 1209600))));
1247:            }
1248:
1249:            public static final FlowRate newBarrelsPerFortnight(String s) {
1250:                return new FlowRate((Double.valueOf(s).doubleValue())
1251:                        * (1.0d / ((1.0d / 158.98729) / (1.0d / 1209600))));
1252:            }
1253:
1254:            public int getCommonUnit() {
1255:                return 23;
1256:            }
1257:
1258:            public int getMaxUnit() {
1259:                return MAXUNIT;
1260:            }
1261:
1262:            // unit names for getUnitName
1263:            private static final String unitNames[] = { "liters/second",
1264:                    "liters/minute", "liters/hour", "liters/day",
1265:                    "liters/week", "liters/millisecond", "liters/kilosecond",
1266:                    "liters/month", "liters/year", "liters/fortnight",
1267:                    "ounces/second", "ounces/minute", "ounces/hour",
1268:                    "ounces/day", "ounces/week", "ounces/millisecond",
1269:                    "ounces/kilosecond", "ounces/month", "ounces/year",
1270:                    "ounces/fortnight", "gallons/second", "gallons/minute",
1271:                    "gallons/hour", "gallons/day", "gallons/week",
1272:                    "gallons/millisecond", "gallons/kilosecond",
1273:                    "gallons/month", "gallons/year", "gallons/fortnight",
1274:                    "imperial_gallons/second", "imperial_gallons/minute",
1275:                    "imperial_gallons/hour", "imperial_gallons/day",
1276:                    "imperial_gallons/week", "imperial_gallons/millisecond",
1277:                    "imperial_gallons/kilosecond", "imperial_gallons/month",
1278:                    "imperial_gallons/year", "imperial_gallons/fortnight",
1279:                    "cubic_feet/second", "cubic_feet/minute",
1280:                    "cubic_feet/hour", "cubic_feet/day", "cubic_feet/week",
1281:                    "cubic_feet/millisecond", "cubic_feet/kilosecond",
1282:                    "cubic_feet/month", "cubic_feet/year",
1283:                    "cubic_feet/fortnight", "cubic_yards/second",
1284:                    "cubic_yards/minute", "cubic_yards/hour",
1285:                    "cubic_yards/day", "cubic_yards/week",
1286:                    "cubic_yards/millisecond", "cubic_yards/kilosecond",
1287:                    "cubic_yards/month", "cubic_yards/year",
1288:                    "cubic_yards/fortnight", "mtons/second", "mtons/minute",
1289:                    "mtons/hour", "mtons/day", "mtons/week",
1290:                    "mtons/millisecond", "mtons/kilosecond", "mtons/month",
1291:                    "mtons/year", "mtons/fortnight",
1292:                    "cubic_centimeters/second", "cubic_centimeters/minute",
1293:                    "cubic_centimeters/hour", "cubic_centimeters/day",
1294:                    "cubic_centimeters/week", "cubic_centimeters/millisecond",
1295:                    "cubic_centimeters/kilosecond", "cubic_centimeters/month",
1296:                    "cubic_centimeters/year", "cubic_centimeters/fortnight",
1297:                    "cubic_meters/second", "cubic_meters/minute",
1298:                    "cubic_meters/hour", "cubic_meters/day",
1299:                    "cubic_meters/week", "cubic_meters/millisecond",
1300:                    "cubic_meters/kilosecond", "cubic_meters/month",
1301:                    "cubic_meters/year", "cubic_meters/fortnight",
1302:                    "barrels/second", "barrels/minute", "barrels/hour",
1303:                    "barrels/day", "barrels/week", "barrels/millisecond",
1304:                    "barrels/kilosecond", "barrels/month", "barrels/year",
1305:                    "barrels/fortnight", };
1306:
1307:            /** @param unit One of the constant units of FlowRate **/
1308:            public final String getUnitName(int unit) {
1309:                return unitNames[unit];
1310:            }
1311:
1312:            // Index Typed factory methods
1313:            static final double convFactor[] = { (1.0d / 1.0d),
1314:                    (1.0d / (1.0d / 60)), (1.0d / (1.0d / 3600)),
1315:                    (1.0d / (1.0d / 86400)), (1.0d / (1.0d / 604800)),
1316:                    (1.0d / 1000), (1.0d / (1.0d / 1000)),
1317:                    (1.0d / (1.0d / 2629743.8)), (1.0d / (1.0d / 31556926)),
1318:                    (1.0d / (1.0d / 1209600)), (33.814023 / 1.0d),
1319:                    (33.814023 / (1.0d / 60)), (33.814023 / (1.0d / 3600)),
1320:                    (33.814023 / (1.0d / 86400)),
1321:                    (33.814023 / (1.0d / 604800)), (33.814023 / 1000),
1322:                    (33.814023 / (1.0d / 1000)),
1323:                    (33.814023 / (1.0d / 2629743.8)),
1324:                    (33.814023 / (1.0d / 31556926)),
1325:                    (33.814023 / (1.0d / 1209600)), ((1.0d / 3.785412) / 1.0d),
1326:                    ((1.0d / 3.785412) / (1.0d / 60)),
1327:                    ((1.0d / 3.785412) / (1.0d / 3600)),
1328:                    ((1.0d / 3.785412) / (1.0d / 86400)),
1329:                    ((1.0d / 3.785412) / (1.0d / 604800)),
1330:                    ((1.0d / 3.785412) / 1000),
1331:                    ((1.0d / 3.785412) / (1.0d / 1000)),
1332:                    ((1.0d / 3.785412) / (1.0d / 2629743.8)),
1333:                    ((1.0d / 3.785412) / (1.0d / 31556926)),
1334:                    ((1.0d / 3.785412) / (1.0d / 1209600)),
1335:                    ((1.0d / 4.546090) / 1.0d),
1336:                    ((1.0d / 4.546090) / (1.0d / 60)),
1337:                    ((1.0d / 4.546090) / (1.0d / 3600)),
1338:                    ((1.0d / 4.546090) / (1.0d / 86400)),
1339:                    ((1.0d / 4.546090) / (1.0d / 604800)),
1340:                    ((1.0d / 4.546090) / 1000),
1341:                    ((1.0d / 4.546090) / (1.0d / 1000)),
1342:                    ((1.0d / 4.546090) / (1.0d / 2629743.8)),
1343:                    ((1.0d / 4.546090) / (1.0d / 31556926)),
1344:                    ((1.0d / 4.546090) / (1.0d / 1209600)),
1345:                    ((1.0d / 28.316847) / 1.0d),
1346:                    ((1.0d / 28.316847) / (1.0d / 60)),
1347:                    ((1.0d / 28.316847) / (1.0d / 3600)),
1348:                    ((1.0d / 28.316847) / (1.0d / 86400)),
1349:                    ((1.0d / 28.316847) / (1.0d / 604800)),
1350:                    ((1.0d / 28.316847) / 1000),
1351:                    ((1.0d / 28.316847) / (1.0d / 1000)),
1352:                    ((1.0d / 28.316847) / (1.0d / 2629743.8)),
1353:                    ((1.0d / 28.316847) / (1.0d / 31556926)),
1354:                    ((1.0d / 28.316847) / (1.0d / 1209600)),
1355:                    ((1.0d / 764.55486) / 1.0d),
1356:                    ((1.0d / 764.55486) / (1.0d / 60)),
1357:                    ((1.0d / 764.55486) / (1.0d / 3600)),
1358:                    ((1.0d / 764.55486) / (1.0d / 86400)),
1359:                    ((1.0d / 764.55486) / (1.0d / 604800)),
1360:                    ((1.0d / 764.55486) / 1000),
1361:                    ((1.0d / 764.55486) / (1.0d / 1000)),
1362:                    ((1.0d / 764.55486) / (1.0d / 2629743.8)),
1363:                    ((1.0d / 764.55486) / (1.0d / 31556926)),
1364:                    ((1.0d / 764.55486) / (1.0d / 1209600)),
1365:                    ((1.0d / 1132.67388) / 1.0d),
1366:                    ((1.0d / 1132.67388) / (1.0d / 60)),
1367:                    ((1.0d / 1132.67388) / (1.0d / 3600)),
1368:                    ((1.0d / 1132.67388) / (1.0d / 86400)),
1369:                    ((1.0d / 1132.67388) / (1.0d / 604800)),
1370:                    ((1.0d / 1132.67388) / 1000),
1371:                    ((1.0d / 1132.67388) / (1.0d / 1000)),
1372:                    ((1.0d / 1132.67388) / (1.0d / 2629743.8)),
1373:                    ((1.0d / 1132.67388) / (1.0d / 31556926)),
1374:                    ((1.0d / 1132.67388) / (1.0d / 1209600)), (1000 / 1.0d),
1375:                    (1000 / (1.0d / 60)), (1000 / (1.0d / 3600)),
1376:                    (1000 / (1.0d / 86400)), (1000 / (1.0d / 604800)),
1377:                    (1000 / 1000), (1000 / (1.0d / 1000)),
1378:                    (1000 / (1.0d / 2629743.8)), (1000 / (1.0d / 31556926)),
1379:                    (1000 / (1.0d / 1209600)), ((1.0d / 1000) / 1.0d),
1380:                    ((1.0d / 1000) / (1.0d / 60)),
1381:                    ((1.0d / 1000) / (1.0d / 3600)),
1382:                    ((1.0d / 1000) / (1.0d / 86400)),
1383:                    ((1.0d / 1000) / (1.0d / 604800)), ((1.0d / 1000) / 1000),
1384:                    ((1.0d / 1000) / (1.0d / 1000)),
1385:                    ((1.0d / 1000) / (1.0d / 2629743.8)),
1386:                    ((1.0d / 1000) / (1.0d / 31556926)),
1387:                    ((1.0d / 1000) / (1.0d / 1209600)),
1388:                    ((1.0d / 158.98729) / 1.0d),
1389:                    ((1.0d / 158.98729) / (1.0d / 60)),
1390:                    ((1.0d / 158.98729) / (1.0d / 3600)),
1391:                    ((1.0d / 158.98729) / (1.0d / 86400)),
1392:                    ((1.0d / 158.98729) / (1.0d / 604800)),
1393:                    ((1.0d / 158.98729) / 1000),
1394:                    ((1.0d / 158.98729) / (1.0d / 1000)),
1395:                    ((1.0d / 158.98729) / (1.0d / 2629743.8)),
1396:                    ((1.0d / 158.98729) / (1.0d / 31556926)),
1397:                    ((1.0d / 158.98729) / (1.0d / 1209600)), };
1398:
1399:            public static final double getConvFactor(int i) {
1400:                return convFactor[i];
1401:            }
1402:
1403:            // indexes into factor array
1404:            public static final int LITERS_PER_SECOND = 0;
1405:            public static final int LITERS_PER_MINUTE = 1;
1406:            public static final int LITERS_PER_HOUR = 2;
1407:            public static final int LITERS_PER_DAY = 3;
1408:            public static final int LITERS_PER_WEEK = 4;
1409:            public static final int LITERS_PER_MILLISECOND = 5;
1410:            public static final int LITERS_PER_KILOSECOND = 6;
1411:            public static final int LITERS_PER_MONTH = 7;
1412:            public static final int LITERS_PER_YEAR = 8;
1413:            public static final int LITERS_PER_FORTNIGHT = 9;
1414:            public static final int OUNCES_PER_SECOND = 10;
1415:            public static final int OUNCES_PER_MINUTE = 11;
1416:            public static final int OUNCES_PER_HOUR = 12;
1417:            public static final int OUNCES_PER_DAY = 13;
1418:            public static final int OUNCES_PER_WEEK = 14;
1419:            public static final int OUNCES_PER_MILLISECOND = 15;
1420:            public static final int OUNCES_PER_KILOSECOND = 16;
1421:            public static final int OUNCES_PER_MONTH = 17;
1422:            public static final int OUNCES_PER_YEAR = 18;
1423:            public static final int OUNCES_PER_FORTNIGHT = 19;
1424:            public static final int GALLONS_PER_SECOND = 20;
1425:            public static final int GALLONS_PER_MINUTE = 21;
1426:            public static final int GALLONS_PER_HOUR = 22;
1427:            public static final int GALLONS_PER_DAY = 23;
1428:            public static final int GALLONS_PER_WEEK = 24;
1429:            public static final int GALLONS_PER_MILLISECOND = 25;
1430:            public static final int GALLONS_PER_KILOSECOND = 26;
1431:            public static final int GALLONS_PER_MONTH = 27;
1432:            public static final int GALLONS_PER_YEAR = 28;
1433:            public static final int GALLONS_PER_FORTNIGHT = 29;
1434:            public static final int IMPERIAL_GALLONS_PER_SECOND = 30;
1435:            public static final int IMPERIAL_GALLONS_PER_MINUTE = 31;
1436:            public static final int IMPERIAL_GALLONS_PER_HOUR = 32;
1437:            public static final int IMPERIAL_GALLONS_PER_DAY = 33;
1438:            public static final int IMPERIAL_GALLONS_PER_WEEK = 34;
1439:            public static final int IMPERIAL_GALLONS_PER_MILLISECOND = 35;
1440:            public static final int IMPERIAL_GALLONS_PER_KILOSECOND = 36;
1441:            public static final int IMPERIAL_GALLONS_PER_MONTH = 37;
1442:            public static final int IMPERIAL_GALLONS_PER_YEAR = 38;
1443:            public static final int IMPERIAL_GALLONS_PER_FORTNIGHT = 39;
1444:            public static final int CUBIC_FEET_PER_SECOND = 40;
1445:            public static final int CUBIC_FEET_PER_MINUTE = 41;
1446:            public static final int CUBIC_FEET_PER_HOUR = 42;
1447:            public static final int CUBIC_FEET_PER_DAY = 43;
1448:            public static final int CUBIC_FEET_PER_WEEK = 44;
1449:            public static final int CUBIC_FEET_PER_MILLISECOND = 45;
1450:            public static final int CUBIC_FEET_PER_KILOSECOND = 46;
1451:            public static final int CUBIC_FEET_PER_MONTH = 47;
1452:            public static final int CUBIC_FEET_PER_YEAR = 48;
1453:            public static final int CUBIC_FEET_PER_FORTNIGHT = 49;
1454:            public static final int CUBIC_YARDS_PER_SECOND = 50;
1455:            public static final int CUBIC_YARDS_PER_MINUTE = 51;
1456:            public static final int CUBIC_YARDS_PER_HOUR = 52;
1457:            public static final int CUBIC_YARDS_PER_DAY = 53;
1458:            public static final int CUBIC_YARDS_PER_WEEK = 54;
1459:            public static final int CUBIC_YARDS_PER_MILLISECOND = 55;
1460:            public static final int CUBIC_YARDS_PER_KILOSECOND = 56;
1461:            public static final int CUBIC_YARDS_PER_MONTH = 57;
1462:            public static final int CUBIC_YARDS_PER_YEAR = 58;
1463:            public static final int CUBIC_YARDS_PER_FORTNIGHT = 59;
1464:            public static final int MTONS_PER_SECOND = 60;
1465:            public static final int MTONS_PER_MINUTE = 61;
1466:            public static final int MTONS_PER_HOUR = 62;
1467:            public static final int MTONS_PER_DAY = 63;
1468:            public static final int MTONS_PER_WEEK = 64;
1469:            public static final int MTONS_PER_MILLISECOND = 65;
1470:            public static final int MTONS_PER_KILOSECOND = 66;
1471:            public static final int MTONS_PER_MONTH = 67;
1472:            public static final int MTONS_PER_YEAR = 68;
1473:            public static final int MTONS_PER_FORTNIGHT = 69;
1474:            public static final int CUBIC_CENTIMETERS_PER_SECOND = 70;
1475:            public static final int CUBIC_CENTIMETERS_PER_MINUTE = 71;
1476:            public static final int CUBIC_CENTIMETERS_PER_HOUR = 72;
1477:            public static final int CUBIC_CENTIMETERS_PER_DAY = 73;
1478:            public static final int CUBIC_CENTIMETERS_PER_WEEK = 74;
1479:            public static final int CUBIC_CENTIMETERS_PER_MILLISECOND = 75;
1480:            public static final int CUBIC_CENTIMETERS_PER_KILOSECOND = 76;
1481:            public static final int CUBIC_CENTIMETERS_PER_MONTH = 77;
1482:            public static final int CUBIC_CENTIMETERS_PER_YEAR = 78;
1483:            public static final int CUBIC_CENTIMETERS_PER_FORTNIGHT = 79;
1484:            public static final int CUBIC_METERS_PER_SECOND = 80;
1485:            public static final int CUBIC_METERS_PER_MINUTE = 81;
1486:            public static final int CUBIC_METERS_PER_HOUR = 82;
1487:            public static final int CUBIC_METERS_PER_DAY = 83;
1488:            public static final int CUBIC_METERS_PER_WEEK = 84;
1489:            public static final int CUBIC_METERS_PER_MILLISECOND = 85;
1490:            public static final int CUBIC_METERS_PER_KILOSECOND = 86;
1491:            public static final int CUBIC_METERS_PER_MONTH = 87;
1492:            public static final int CUBIC_METERS_PER_YEAR = 88;
1493:            public static final int CUBIC_METERS_PER_FORTNIGHT = 89;
1494:            public static final int BARRELS_PER_SECOND = 90;
1495:            public static final int BARRELS_PER_MINUTE = 91;
1496:            public static final int BARRELS_PER_HOUR = 92;
1497:            public static final int BARRELS_PER_DAY = 93;
1498:            public static final int BARRELS_PER_WEEK = 94;
1499:            public static final int BARRELS_PER_MILLISECOND = 95;
1500:            public static final int BARRELS_PER_KILOSECOND = 96;
1501:            public static final int BARRELS_PER_MONTH = 97;
1502:            public static final int BARRELS_PER_YEAR = 98;
1503:            public static final int BARRELS_PER_FORTNIGHT = 99;
1504:            static final int MAXUNIT = 99;
1505:
1506:            // Index Typed factory methods
1507:            /** @param unit One of the constant units of FlowRate **/
1508:            public static final FlowRate newFlowRate(double v, int unit) {
1509:                if (unit >= 0 && unit <= MAXUNIT)
1510:                    return new FlowRate(v * getConvFactor(unit));
1511:                else
1512:                    throw new UnknownUnitException();
1513:            }
1514:
1515:            /** @param unit One of the constant units of FlowRate **/
1516:            public static final FlowRate newFlowRate(String s, int unit) {
1517:                if (unit >= 0 && unit <= MAXUNIT)
1518:                    return new FlowRate((Double.valueOf(s).doubleValue())
1519:                            * getConvFactor(unit));
1520:                else
1521:                    throw new UnknownUnitException();
1522:            }
1523:
1524:            // Index Typed factory methods
1525:            /** @param unit1 One of the constant units of Volume
1526:             *  @param unit2 One of the constant units of Duration
1527:             **/
1528:            public static final FlowRate newFlowRate(double v, int unit1,
1529:                    int unit2) {
1530:                if (unit1 >= 0 && unit1 <= Volume.MAXUNIT && unit2 >= 0
1531:                        && unit2 <= Duration.MAXUNIT)
1532:                    return new FlowRate(v * Volume.getConvFactor(unit1)
1533:                            / Duration.getConvFactor(unit2));
1534:                else
1535:                    throw new UnknownUnitException();
1536:            }
1537:
1538:            /** @param num An instance of Volume to use as numerator
1539:             *  @param den An instance of Durationto use as denominator
1540:             **/
1541:            public static final FlowRate newFlowRate(Volume num, Duration den) {
1542:                return new FlowRate(num.getValue(0) / den.getValue(0));
1543:            }
1544:
1545:            /** @param unit1 One of the constant units of Volume
1546:             *  @param unit2 One of the constant units of Duration
1547:             **/
1548:            public static final FlowRate newFlowRate(String s, int unit1,
1549:                    int unit2) {
1550:                if (unit1 >= 0 && unit1 <= Volume.MAXUNIT && unit2 >= 0
1551:                        && unit2 <= Duration.MAXUNIT)
1552:                    return new FlowRate((Double.valueOf(s).doubleValue())
1553:                            * Volume.getConvFactor(unit1)
1554:                            / Duration.getConvFactor(unit2));
1555:                else
1556:                    throw new UnknownUnitException();
1557:            }
1558:
1559:            // Support for AbstractMeasure-level constructor
1560:            public static final AbstractMeasure newMeasure(String s, int unit) {
1561:                return newFlowRate(s, unit);
1562:            }
1563:
1564:            public static final AbstractMeasure newMeasure(double v, int unit) {
1565:                return newFlowRate(v, unit);
1566:            }
1567:
1568:            // simple math : addition and subtraction
1569:            public final Measure add(Measure toAdd) {
1570:                if (!(toAdd instanceof  FlowRate))
1571:                    throw new IllegalArgumentException();
1572:                return new FlowRate(theValue + toAdd.getNativeValue());
1573:            }
1574:
1575:            public final Measure subtract(Measure toSubtract) {
1576:                if (!(toSubtract instanceof  FlowRate))
1577:                    throw new IllegalArgumentException();
1578:                return new FlowRate(theValue - toSubtract.getNativeValue());
1579:            }
1580:
1581:            public final Measure scale(double scale) {
1582:                return new FlowRate(theValue * scale, 0);
1583:            }
1584:
1585:            public final Measure negate() {
1586:                return newFlowRate(-1 * theValue, 0);
1587:            }
1588:
1589:            public final Measure floor(int unit) {
1590:                return newFlowRate(Math.floor(getValue(unit)), 0);
1591:            }
1592:
1593:            public final Measure valueOf(double value) {
1594:                return new FlowRate(value);
1595:            }
1596:
1597:            public final Measure valueOf(double value, int unit) {
1598:                return new FlowRate(value, unit);
1599:            }
1600:
1601:            public final double getNativeValue() {
1602:                return theValue;
1603:            }
1604:
1605:            public final int getNativeUnit() {
1606:                return 0;
1607:            }
1608:
1609:            public final Duration divide(Rate toRate) {
1610:                throw new IllegalArgumentException(
1611:                        "Call divideRate instead to divide one Rate by another.");
1612:            }
1613:
1614:            public final double divideRate(Rate toRate) {
1615:                if (toRate.getCanonicalNumerator().getClass() != getCanonicalNumerator()
1616:                        .getClass()
1617:                        || toRate.getCanonicalDenominator().getClass() != getCanonicalDenominator()
1618:                                .getClass()) {
1619:                    throw new IllegalArgumentException("Expecting a FlowRate"
1620:                            + ", got a "
1621:                            + toRate.getCanonicalNumerator().getClass() + "/"
1622:                            + toRate.getCanonicalDenominator().getClass());
1623:                }
1624:                return theValue / toRate.getNativeValue();
1625:            }
1626:
1627:            // Unit-based Reader methods
1628:            public double getLitersPerSecond() {
1629:                return (theValue * (1.0d / 1.0d));
1630:            }
1631:
1632:            public double getLitersPerMinute() {
1633:                return (theValue * (1.0d / (1.0d / 60)));
1634:            }
1635:
1636:            public double getLitersPerHour() {
1637:                return (theValue * (1.0d / (1.0d / 3600)));
1638:            }
1639:
1640:            public double getLitersPerDay() {
1641:                return (theValue * (1.0d / (1.0d / 86400)));
1642:            }
1643:
1644:            public double getLitersPerWeek() {
1645:                return (theValue * (1.0d / (1.0d / 604800)));
1646:            }
1647:
1648:            public double getLitersPerMillisecond() {
1649:                return (theValue * (1.0d / 1000));
1650:            }
1651:
1652:            public double getLitersPerKilosecond() {
1653:                return (theValue * (1.0d / (1.0d / 1000)));
1654:            }
1655:
1656:            public double getLitersPerMonth() {
1657:                return (theValue * (1.0d / (1.0d / 2629743.8)));
1658:            }
1659:
1660:            public double getLitersPerYear() {
1661:                return (theValue * (1.0d / (1.0d / 31556926)));
1662:            }
1663:
1664:            public double getLitersPerFortnight() {
1665:                return (theValue * (1.0d / (1.0d / 1209600)));
1666:            }
1667:
1668:            public double getOuncesPerSecond() {
1669:                return (theValue * (33.814023 / 1.0d));
1670:            }
1671:
1672:            public double getOuncesPerMinute() {
1673:                return (theValue * (33.814023 / (1.0d / 60)));
1674:            }
1675:
1676:            public double getOuncesPerHour() {
1677:                return (theValue * (33.814023 / (1.0d / 3600)));
1678:            }
1679:
1680:            public double getOuncesPerDay() {
1681:                return (theValue * (33.814023 / (1.0d / 86400)));
1682:            }
1683:
1684:            public double getOuncesPerWeek() {
1685:                return (theValue * (33.814023 / (1.0d / 604800)));
1686:            }
1687:
1688:            public double getOuncesPerMillisecond() {
1689:                return (theValue * (33.814023 / 1000));
1690:            }
1691:
1692:            public double getOuncesPerKilosecond() {
1693:                return (theValue * (33.814023 / (1.0d / 1000)));
1694:            }
1695:
1696:            public double getOuncesPerMonth() {
1697:                return (theValue * (33.814023 / (1.0d / 2629743.8)));
1698:            }
1699:
1700:            public double getOuncesPerYear() {
1701:                return (theValue * (33.814023 / (1.0d / 31556926)));
1702:            }
1703:
1704:            public double getOuncesPerFortnight() {
1705:                return (theValue * (33.814023 / (1.0d / 1209600)));
1706:            }
1707:
1708:            public double getGallonsPerSecond() {
1709:                return (theValue * ((1.0d / 3.785412) / 1.0d));
1710:            }
1711:
1712:            public double getGallonsPerMinute() {
1713:                return (theValue * ((1.0d / 3.785412) / (1.0d / 60)));
1714:            }
1715:
1716:            public double getGallonsPerHour() {
1717:                return (theValue * ((1.0d / 3.785412) / (1.0d / 3600)));
1718:            }
1719:
1720:            public double getGallonsPerDay() {
1721:                return (theValue * ((1.0d / 3.785412) / (1.0d / 86400)));
1722:            }
1723:
1724:            public double getGallonsPerWeek() {
1725:                return (theValue * ((1.0d / 3.785412) / (1.0d / 604800)));
1726:            }
1727:
1728:            public double getGallonsPerMillisecond() {
1729:                return (theValue * ((1.0d / 3.785412) / 1000));
1730:            }
1731:
1732:            public double getGallonsPerKilosecond() {
1733:                return (theValue * ((1.0d / 3.785412) / (1.0d / 1000)));
1734:            }
1735:
1736:            public double getGallonsPerMonth() {
1737:                return (theValue * ((1.0d / 3.785412) / (1.0d / 2629743.8)));
1738:            }
1739:
1740:            public double getGallonsPerYear() {
1741:                return (theValue * ((1.0d / 3.785412) / (1.0d / 31556926)));
1742:            }
1743:
1744:            public double getGallonsPerFortnight() {
1745:                return (theValue * ((1.0d / 3.785412) / (1.0d / 1209600)));
1746:            }
1747:
1748:            public double getImperialGallonsPerSecond() {
1749:                return (theValue * ((1.0d / 4.546090) / 1.0d));
1750:            }
1751:
1752:            public double getImperialGallonsPerMinute() {
1753:                return (theValue * ((1.0d / 4.546090) / (1.0d / 60)));
1754:            }
1755:
1756:            public double getImperialGallonsPerHour() {
1757:                return (theValue * ((1.0d / 4.546090) / (1.0d / 3600)));
1758:            }
1759:
1760:            public double getImperialGallonsPerDay() {
1761:                return (theValue * ((1.0d / 4.546090) / (1.0d / 86400)));
1762:            }
1763:
1764:            public double getImperialGallonsPerWeek() {
1765:                return (theValue * ((1.0d / 4.546090) / (1.0d / 604800)));
1766:            }
1767:
1768:            public double getImperialGallonsPerMillisecond() {
1769:                return (theValue * ((1.0d / 4.546090) / 1000));
1770:            }
1771:
1772:            public double getImperialGallonsPerKilosecond() {
1773:                return (theValue * ((1.0d / 4.546090) / (1.0d / 1000)));
1774:            }
1775:
1776:            public double getImperialGallonsPerMonth() {
1777:                return (theValue * ((1.0d / 4.546090) / (1.0d / 2629743.8)));
1778:            }
1779:
1780:            public double getImperialGallonsPerYear() {
1781:                return (theValue * ((1.0d / 4.546090) / (1.0d / 31556926)));
1782:            }
1783:
1784:            public double getImperialGallonsPerFortnight() {
1785:                return (theValue * ((1.0d / 4.546090) / (1.0d / 1209600)));
1786:            }
1787:
1788:            public double getCubicFeetPerSecond() {
1789:                return (theValue * ((1.0d / 28.316847) / 1.0d));
1790:            }
1791:
1792:            public double getCubicFeetPerMinute() {
1793:                return (theValue * ((1.0d / 28.316847) / (1.0d / 60)));
1794:            }
1795:
1796:            public double getCubicFeetPerHour() {
1797:                return (theValue * ((1.0d / 28.316847) / (1.0d / 3600)));
1798:            }
1799:
1800:            public double getCubicFeetPerDay() {
1801:                return (theValue * ((1.0d / 28.316847) / (1.0d / 86400)));
1802:            }
1803:
1804:            public double getCubicFeetPerWeek() {
1805:                return (theValue * ((1.0d / 28.316847) / (1.0d / 604800)));
1806:            }
1807:
1808:            public double getCubicFeetPerMillisecond() {
1809:                return (theValue * ((1.0d / 28.316847) / 1000));
1810:            }
1811:
1812:            public double getCubicFeetPerKilosecond() {
1813:                return (theValue * ((1.0d / 28.316847) / (1.0d / 1000)));
1814:            }
1815:
1816:            public double getCubicFeetPerMonth() {
1817:                return (theValue * ((1.0d / 28.316847) / (1.0d / 2629743.8)));
1818:            }
1819:
1820:            public double getCubicFeetPerYear() {
1821:                return (theValue * ((1.0d / 28.316847) / (1.0d / 31556926)));
1822:            }
1823:
1824:            public double getCubicFeetPerFortnight() {
1825:                return (theValue * ((1.0d / 28.316847) / (1.0d / 1209600)));
1826:            }
1827:
1828:            public double getCubicYardsPerSecond() {
1829:                return (theValue * ((1.0d / 764.55486) / 1.0d));
1830:            }
1831:
1832:            public double getCubicYardsPerMinute() {
1833:                return (theValue * ((1.0d / 764.55486) / (1.0d / 60)));
1834:            }
1835:
1836:            public double getCubicYardsPerHour() {
1837:                return (theValue * ((1.0d / 764.55486) / (1.0d / 3600)));
1838:            }
1839:
1840:            public double getCubicYardsPerDay() {
1841:                return (theValue * ((1.0d / 764.55486) / (1.0d / 86400)));
1842:            }
1843:
1844:            public double getCubicYardsPerWeek() {
1845:                return (theValue * ((1.0d / 764.55486) / (1.0d / 604800)));
1846:            }
1847:
1848:            public double getCubicYardsPerMillisecond() {
1849:                return (theValue * ((1.0d / 764.55486) / 1000));
1850:            }
1851:
1852:            public double getCubicYardsPerKilosecond() {
1853:                return (theValue * ((1.0d / 764.55486) / (1.0d / 1000)));
1854:            }
1855:
1856:            public double getCubicYardsPerMonth() {
1857:                return (theValue * ((1.0d / 764.55486) / (1.0d / 2629743.8)));
1858:            }
1859:
1860:            public double getCubicYardsPerYear() {
1861:                return (theValue * ((1.0d / 764.55486) / (1.0d / 31556926)));
1862:            }
1863:
1864:            public double getCubicYardsPerFortnight() {
1865:                return (theValue * ((1.0d / 764.55486) / (1.0d / 1209600)));
1866:            }
1867:
1868:            public double getMtonsPerSecond() {
1869:                return (theValue * ((1.0d / 1132.67388) / 1.0d));
1870:            }
1871:
1872:            public double getMtonsPerMinute() {
1873:                return (theValue * ((1.0d / 1132.67388) / (1.0d / 60)));
1874:            }
1875:
1876:            public double getMtonsPerHour() {
1877:                return (theValue * ((1.0d / 1132.67388) / (1.0d / 3600)));
1878:            }
1879:
1880:            public double getMtonsPerDay() {
1881:                return (theValue * ((1.0d / 1132.67388) / (1.0d / 86400)));
1882:            }
1883:
1884:            public double getMtonsPerWeek() {
1885:                return (theValue * ((1.0d / 1132.67388) / (1.0d / 604800)));
1886:            }
1887:
1888:            public double getMtonsPerMillisecond() {
1889:                return (theValue * ((1.0d / 1132.67388) / 1000));
1890:            }
1891:
1892:            public double getMtonsPerKilosecond() {
1893:                return (theValue * ((1.0d / 1132.67388) / (1.0d / 1000)));
1894:            }
1895:
1896:            public double getMtonsPerMonth() {
1897:                return (theValue * ((1.0d / 1132.67388) / (1.0d / 2629743.8)));
1898:            }
1899:
1900:            public double getMtonsPerYear() {
1901:                return (theValue * ((1.0d / 1132.67388) / (1.0d / 31556926)));
1902:            }
1903:
1904:            public double getMtonsPerFortnight() {
1905:                return (theValue * ((1.0d / 1132.67388) / (1.0d / 1209600)));
1906:            }
1907:
1908:            public double getCubicCentimetersPerSecond() {
1909:                return (theValue * (1000 / 1.0d));
1910:            }
1911:
1912:            public double getCubicCentimetersPerMinute() {
1913:                return (theValue * (1000 / (1.0d / 60)));
1914:            }
1915:
1916:            public double getCubicCentimetersPerHour() {
1917:                return (theValue * (1000 / (1.0d / 3600)));
1918:            }
1919:
1920:            public double getCubicCentimetersPerDay() {
1921:                return (theValue * (1000 / (1.0d / 86400)));
1922:            }
1923:
1924:            public double getCubicCentimetersPerWeek() {
1925:                return (theValue * (1000 / (1.0d / 604800)));
1926:            }
1927:
1928:            public double getCubicCentimetersPerMillisecond() {
1929:                return (theValue * (1000 / 1000));
1930:            }
1931:
1932:            public double getCubicCentimetersPerKilosecond() {
1933:                return (theValue * (1000 / (1.0d / 1000)));
1934:            }
1935:
1936:            public double getCubicCentimetersPerMonth() {
1937:                return (theValue * (1000 / (1.0d / 2629743.8)));
1938:            }
1939:
1940:            public double getCubicCentimetersPerYear() {
1941:                return (theValue * (1000 / (1.0d / 31556926)));
1942:            }
1943:
1944:            public double getCubicCentimetersPerFortnight() {
1945:                return (theValue * (1000 / (1.0d / 1209600)));
1946:            }
1947:
1948:            public double getCubicMetersPerSecond() {
1949:                return (theValue * ((1.0d / 1000) / 1.0d));
1950:            }
1951:
1952:            public double getCubicMetersPerMinute() {
1953:                return (theValue * ((1.0d / 1000) / (1.0d / 60)));
1954:            }
1955:
1956:            public double getCubicMetersPerHour() {
1957:                return (theValue * ((1.0d / 1000) / (1.0d / 3600)));
1958:            }
1959:
1960:            public double getCubicMetersPerDay() {
1961:                return (theValue * ((1.0d / 1000) / (1.0d / 86400)));
1962:            }
1963:
1964:            public double getCubicMetersPerWeek() {
1965:                return (theValue * ((1.0d / 1000) / (1.0d / 604800)));
1966:            }
1967:
1968:            public double getCubicMetersPerMillisecond() {
1969:                return (theValue * ((1.0d / 1000) / 1000));
1970:            }
1971:
1972:            public double getCubicMetersPerKilosecond() {
1973:                return (theValue * ((1.0d / 1000) / (1.0d / 1000)));
1974:            }
1975:
1976:            public double getCubicMetersPerMonth() {
1977:                return (theValue * ((1.0d / 1000) / (1.0d / 2629743.8)));
1978:            }
1979:
1980:            public double getCubicMetersPerYear() {
1981:                return (theValue * ((1.0d / 1000) / (1.0d / 31556926)));
1982:            }
1983:
1984:            public double getCubicMetersPerFortnight() {
1985:                return (theValue * ((1.0d / 1000) / (1.0d / 1209600)));
1986:            }
1987:
1988:            public double getBarrelsPerSecond() {
1989:                return (theValue * ((1.0d / 158.98729) / 1.0d));
1990:            }
1991:
1992:            public double getBarrelsPerMinute() {
1993:                return (theValue * ((1.0d / 158.98729) / (1.0d / 60)));
1994:            }
1995:
1996:            public double getBarrelsPerHour() {
1997:                return (theValue * ((1.0d / 158.98729) / (1.0d / 3600)));
1998:            }
1999:
2000:            public double getBarrelsPerDay() {
2001:                return (theValue * ((1.0d / 158.98729) / (1.0d / 86400)));
2002:            }
2003:
2004:            public double getBarrelsPerWeek() {
2005:                return (theValue * ((1.0d / 158.98729) / (1.0d / 604800)));
2006:            }
2007:
2008:            public double getBarrelsPerMillisecond() {
2009:                return (theValue * ((1.0d / 158.98729) / 1000));
2010:            }
2011:
2012:            public double getBarrelsPerKilosecond() {
2013:                return (theValue * ((1.0d / 158.98729) / (1.0d / 1000)));
2014:            }
2015:
2016:            public double getBarrelsPerMonth() {
2017:                return (theValue * ((1.0d / 158.98729) / (1.0d / 2629743.8)));
2018:            }
2019:
2020:            public double getBarrelsPerYear() {
2021:                return (theValue * ((1.0d / 158.98729) / (1.0d / 31556926)));
2022:            }
2023:
2024:            public double getBarrelsPerFortnight() {
2025:                return (theValue * ((1.0d / 158.98729) / (1.0d / 1209600)));
2026:            }
2027:
2028:            /** @param unit One of the constant units of FlowRate **/
2029:            public double getValue(int unit) {
2030:                if (unit >= 0 && unit <= MAXUNIT)
2031:                    return (theValue * getConvFactor(unit));
2032:                else
2033:                    throw new UnknownUnitException();
2034:            }
2035:
2036:            /** @param unit1 One of the constant units of Volume
2037:             *  @param unit2 One of the constant units of Duration
2038:             **/
2039:            public double getValue(int unit1, int unit2) {
2040:                if (unit1 >= 0 && unit1 <= Volume.MAXUNIT && unit2 >= 0
2041:                        && unit2 <= Duration.MAXUNIT)
2042:                    return (theValue * Duration.getConvFactor(unit2) / Volume
2043:                            .getConvFactor(unit1));
2044:                else
2045:                    throw new UnknownUnitException();
2046:            }
2047:
2048:            public boolean equals(Object o) {
2049:                return (o instanceof  FlowRate && theValue == ((FlowRate) o).theValue);
2050:            }
2051:
2052:            public String toString() {
2053:                return Double.toString(theValue) + "l/s";
2054:            }
2055:
2056:            public int hashCode() {
2057:                return (new Double(theValue)).hashCode();
2058:            }
2059:
2060:            // Derivative
2061:            public final Class getNumeratorClass() {
2062:                return Volume.class;
2063:            }
2064:
2065:            public final Class getDenominatorClass() {
2066:                return Duration.class;
2067:            }
2068:
2069:            private final static Volume can_num = new Volume(0.0, 0);
2070:
2071:            public final Measure getCanonicalNumerator() {
2072:                return can_num;
2073:            }
2074:
2075:            private final static Duration can_den = new Duration(0.0, 0);
2076:
2077:            public final Measure getCanonicalDenominator() {
2078:                return can_den;
2079:            }
2080:
2081:            public final Measure computeNumerator(Measure den) {
2082:                if (!(den instanceof  Duration))
2083:                    throw new IllegalArgumentException();
2084:                return new Volume(theValue * den.getValue(0), 0);
2085:            }
2086:
2087:            public final Measure computeDenominator(Measure num) {
2088:                if (!(num instanceof  Volume))
2089:                    throw new IllegalArgumentException();
2090:                return new Duration(num.getValue(0) / theValue, 0);
2091:            }
2092:
2093:            // serialization
2094:            public void writeExternal(ObjectOutput out) throws IOException {
2095:                out.writeDouble(theValue);
2096:            }
2097:
2098:            public void readExternal(ObjectInput in) throws IOException {
2099:                theValue = in.readDouble();
2100:            }
2101:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.