Permalink
Browse files

OPEN - issue JAVAMONEY-37: Refactoring towards Draft Releases

  • Loading branch information...
1 parent 6df5a77 commit e5c92f8347c7bb4fecbd0833459b7b58b3146b33 @keilw keilw committed Mar 16, 2013
Showing with 3,955 additions and 9,544 deletions.
  1. +63 −63 LICENSE.txt
  2. +124 −124 checkstyle.xml
  3. +0 −3,450 jdk-stub/src/main/java/javamoney/text/DecimalFormat.java
  4. +0 −862 jdk-stub/src/main/java/javamoney/text/DecimalFormatSymbols.java
  5. +29 −28 money-api/convert/pom.xml
  6. +3 −0 money-api/convert/src/etc/header.txt
  7. +3 −29 money-api/convert/src/main/java/javax/money/convert/ConversionProvider.java
  8. +3 −29 money-api/convert/src/main/java/javax/money/convert/CurrencyConversionException.java
  9. +3 −29 money-api/convert/src/main/java/javax/money/convert/CurrencyConverter.java
  10. +147 −173 money-api/convert/src/main/java/javax/money/convert/ExchangeRate.java
  11. +3 −29 money-api/convert/src/main/java/javax/money/convert/ExchangeRateProvider.java
  12. +3 −29 money-api/convert/src/main/java/javax/money/convert/ExchangeRateType.java
  13. +22 −21 money-api/core/pom.xml
  14. +3 −0 money-api/core/src/etc/header.txt
  15. +3 −29 money-api/core/src/main/java/javax/money/CurrencyMismatchException.java
  16. +3 −29 money-api/core/src/main/java/javax/money/CurrencyUnit.java
  17. +3 −29 money-api/core/src/main/java/javax/money/IllegalCurrencyException.java
  18. +68 −94 money-api/core/src/main/java/javax/money/LocalizableCurrencyUnit.java
  19. +68 −94 money-api/core/src/main/java/javax/money/LocalizableMonetaryAmount.java
  20. +3 −29 money-api/core/src/main/java/javax/money/MonetaryAmount.java
  21. +3 −29 money-api/core/src/main/java/javax/money/MonetaryException.java
  22. +35 −61 money-api/core/src/main/java/javax/money/Rounding.java
  23. +3 −29 money-api/core/src/main/java/javax/money/UnknownCurrencyException.java
  24. +5 −0 money-api/core/src/test/do-not-delete.txt
  25. +101 −127 money-api/core/src/test/java/javax/money/CurrencyMismatchExceptionTest.java
  26. +3 −29 money-api/core/src/test/java/javax/money/CurrencyUnitImpl.java
  27. +88 −114 money-api/core/src/test/java/javax/money/IllegalCurrencyExceptionTest.java
  28. +88 −114 money-api/core/src/test/java/javax/money/UnknownCurrencyExceptionTest.java
  29. +3 −0 money-api/ext/src/etc/header.txt
  30. +3 −29 money-api/ext/src/main/java/javax/money/ext/AmountUtils.java
  31. +55 −81 money-api/ext/src/main/java/javax/money/ext/Calculation.java
  32. +44 −70 money-api/ext/src/main/java/javax/money/ext/CalculationProvider.java
  33. +52 −78 money-api/ext/src/main/java/javax/money/ext/ComplexCalculation.java
  34. +3 −29 money-api/ext/src/main/java/javax/money/ext/CompoundValue.java
  35. +3 −29 money-api/ext/src/main/java/javax/money/ext/CompoundValueTemplate.java
  36. +145 −171 money-api/ext/src/main/java/javax/money/ext/Region.java
  37. +56 −82 money-api/ext/src/main/java/javax/money/ext/RegionProvider.java
  38. +24 −50 money-api/ext/src/main/java/javax/money/ext/RegionType.java
  39. +98 −124 money-api/ext/src/main/java/javax/money/ext/RegionalCurrencyUnitProvider.java
  40. +15 −41 money-api/ext/src/main/java/javax/money/ext/annot/ManagedCalculation.java
  41. +3 −0 money-api/format/src/etc/header.txt
  42. +3 −29 money-api/format/src/main/java/javax/money/format/ItemFormatException.java
  43. +3 −29 money-api/format/src/main/java/javax/money/format/ItemFormatter.java
  44. +80 −106 money-api/format/src/main/java/javax/money/format/ItemFormatterFactory.java
  45. +44 −70 money-api/format/src/main/java/javax/money/format/ItemParseException.java
  46. +58 −84 money-api/format/src/main/java/javax/money/format/ItemParser.java
  47. +76 −102 money-api/format/src/main/java/javax/money/format/ItemParserFactory.java
  48. +95 −121 money-api/format/src/main/java/javax/money/format/LocalizableItem.java
  49. +433 −459 money-api/format/src/main/java/javax/money/format/LocalizationStyle.java
  50. +22 −0 money-api/pom.xml
  51. +3 −0 money-api/provider/src/etc/header.txt
  52. +3 −29 money-api/provider/src/main/java/javax/money/provider/CurrencyUnitProvider.java
  53. +37 −83 money-api/provider/src/main/java/javax/money/provider/ExposedExtensionType.java
  54. +444 −470 money-api/provider/src/main/java/javax/money/provider/Monetary.java
  55. +129 −155 money-api/provider/src/main/java/javax/money/provider/MonetaryAmountFactory.java
  56. +71 −97 money-api/provider/src/main/java/javax/money/provider/MonetaryAmountProvider.java
  57. +16 −62 money-api/provider/src/main/java/javax/money/provider/MonetaryExtension.java
  58. +72 −98 money-api/provider/src/main/java/javax/money/provider/RoundingProvider.java
  59. +72 −98 money-api/provider/src/test/java/javax/money/provider/MonetaryServiceLoader.java
  60. +155 −181 money-api/provider/src/test/java/javax/money/provider/MonetaryTest.java
  61. +21 −47 money-api/provider/src/test/java/javax/money/provider/ext/TestExtension.java
  62. +3 −29 money-api/provider/src/test/java/javax/money/provider/impl/TestConversionProvider.java
  63. +3 −29 money-api/provider/src/test/java/javax/money/provider/impl/TestCurrencyUnitProvider.java
  64. +27 −53 money-api/provider/src/test/java/javax/money/provider/impl/TestExtensionImpl.java
  65. +3 −29 money-api/provider/src/test/java/javax/money/provider/impl/TestItemFormatterFactory.java
  66. +3 −29 money-api/provider/src/test/java/javax/money/provider/impl/TestItemParserFactory.java
  67. +52 −78 money-api/provider/src/test/java/javax/money/provider/impl/TestMonetaryAmountProvider.java
  68. +51 −77 money-api/provider/src/test/java/javax/money/provider/impl/TestRoundingProvider.java
  69. +3 −0 money-api/src/etc/header.txt
  70. +50 −43 money-api/src/site/site.xml
  71. 0 {money-ri → money-impl}/.gitignore
  72. 0 {money-ri → money-impl}/LICENSE.txt
  73. +31 −32 {money-ri/ri → money-impl/cdi}/.classpath
  74. 0 {money-ri/ri → money-impl/cdi}/.gitignore
  75. 0 {money-ri/ri-cdi → money-impl/cdi}/.project
  76. 0 {money-ri/ri → money-impl/cdi}/.settings/org.eclipse.core.resources.prefs
  77. +5 −5 {money-ri/ri → money-impl/cdi}/.settings/org.eclipse.jdt.core.prefs
  78. 0 {money-ri/ri → money-impl/cdi}/.settings/org.eclipse.m2e.core.prefs
  79. +4 −5 {money-ri/ri-cdi → money-impl/cdi}/pom.xml
  80. 0 {money-ri/ri-cdi → money-impl/cdi}/src/main/java/net/java/javamoney/ri/loader/CDIContainer.java
  81. 0 ...y-ri/ri-cdi → money-impl/cdi}/src/main/java/net/java/javamoney/ri/loader/CDIStandaloneLoader.java
  82. 0 ...money-impl/cdi}/src/main/resources/META-INF/services/javax.money.provider.Monetary$MonetaryLoader
  83. 0 {money-ri/ri-cdi → money-impl/cdi}/src/test/java/SmokeTests.java
  84. +31 −36 {money-ri/ri-cdi → money-impl/java-ee}/.classpath
  85. 0 {money-ri/ri-ee → money-impl/java-ee}/.gitignore
  86. 0 {money-ri/ri-ee → money-impl/java-ee}/.project
  87. 0 {money-ri/ri-ee → money-impl/java-ee}/.settings/org.eclipse.core.resources.prefs
  88. +5 −5 {money-ri/ri-cdi → money-impl/java-ee}/.settings/org.eclipse.jdt.core.prefs
  89. 0 {money-ri/ri-ee → money-impl/java-ee}/.settings/org.eclipse.m2e.core.prefs
  90. +4 −4 {money-ri/ri-ee → money-impl/java-ee}/pom.xml
  91. 0 {money-ri/ri-ee → money-impl/java-ee}/src/main/java/net/java/javamoney/ri/cdi/qualifiers/Amount.java
  92. 0 ...-ee → money-impl/java-ee}/src/main/java/net/java/javamoney/ri/cdi/qualifiers/LiteralCurrency.java
  93. 0 ...y-impl/java-ee}/src/main/resources/META-INF/services/javax.money.provider.Monetary$MonetaryLoader
  94. 0 { → money-impl}/jdk-stub/.gitignore
  95. +2 −2 { → money-impl}/jdk-stub/pom.xml
  96. +3 −23 { → money-impl}/jdk-stub/src/main/java/javamoney/text/DigitList.java
  97. +5 −26 { → money-impl}/jdk-stub/src/main/java/javamoney/util/Currency.java
  98. +26 −12 {money-ri → money-impl}/pom.xml
  99. +31 −36 {money-ri/ri-ee → money-impl/ri}/.classpath
  100. 0 {money-ri/ri-cdi → money-impl/ri}/.gitignore
  101. +40 −23 {money-ri → money-impl}/ri/.project
  102. +6 −6 {money-ri/ri-cdi → money-impl/ri}/.settings/org.eclipse.core.resources.prefs
  103. +8 −5 {money-ri/ri-ee → money-impl/ri}/.settings/org.eclipse.jdt.core.prefs
  104. 0 {money-ri/ri-cdi → money-impl/ri}/.settings/org.eclipse.m2e.core.prefs
  105. +2 −3 {money-ri → money-impl}/ri/pom.xml
  106. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/common/AbstractAttributableItem.java
  107. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/common/AbstractConfigurableItem.java
  108. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/common/AbstractRiComponent.java
  109. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/convert/CurrencyExchangeRate.java
  110. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/convert/CurrencyExchangeRateType.java
  111. 0 ...money-impl}/ri/src/main/java/net/java/javamoney/ri/convert/provider/DefaultCurrencyConverter.java
  112. 0 ...mpl}/ri/src/main/java/net/java/javamoney/ri/convert/provider/DefaultCurrencyConverterFactory.java
  113. 0 ... money-impl}/ri/src/main/java/net/java/javamoney/ri/convert/provider/EZBExchangeRateProvider.java
  114. 0 ... money-impl}/ri/src/main/java/net/java/javamoney/ri/convert/provider/IMFExchangeRateProvider.java
  115. 0 ...→ money-impl}/ri/src/main/java/net/java/javamoney/ri/convert/spi/CurrencyConverterFactorySpi.java
  116. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/core/IntegralMoney.java
  117. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/core/Money.java
  118. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/core/MoneyCurrency.java
  119. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/core/StandardRoundings.java
  120. 0 ...ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/core/provider/ConversionProviderImpl.java
  121. 0 ... → money-impl}/ri/src/main/java/net/java/javamoney/ri/core/provider/CurrencyUnitProviderImpl.java
  122. 0 ...ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/core/provider/IsoCurrencyJDKProvider.java
  123. 0 ...→ money-impl}/ri/src/main/java/net/java/javamoney/ri/core/provider/IsoCurrencyOnlineProvider.java
  124. 0 ...mpl}/ri/src/main/java/net/java/javamoney/ri/core/provider/MonetaryAmountIntegralMoneyFactory.java
  125. 0 ... money-impl}/ri/src/main/java/net/java/javamoney/ri/core/provider/MonetaryAmountMoneyFactory.java
  126. 0 ... money-impl}/ri/src/main/java/net/java/javamoney/ri/core/provider/MonetaryAmountProviderImpl.java
  127. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/core/spi/CurrencyUnitMappingSpi.java
  128. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/core/spi/CurrencyUnitProviderSpi.java
  129. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/core/spi/RoundingProviderSpi.java
  130. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/ext/MultiValue.java
  131. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/ext/RegionImpl.java
  132. 0 ...ey-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/ext/ResourceBundleLocalizedRegion.java
  133. 0 ...i → money-impl}/ri/src/main/java/net/java/javamoney/ri/ext/ResourceBundleLocalizedRegionType.java
  134. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/ext/SingletonRegionType.java
  135. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/ext/calc/AbstractCalculation.java
  136. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/ext/calc/Average.java
  137. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/ext/calc/Max.java
  138. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/ext/calc/Min.java
  139. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/ext/calc/Sum.java
  140. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/ext/provider/RegionProviderImpl.java
  141. 0 ...y-impl}/ri/src/main/java/net/java/javamoney/ri/ext/provider/RegionalCurrencyUnitProviderImpl.java
  142. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/ext/spi/RegionProviderSpi.java
  143. 0 ...→ money-impl}/ri/src/main/java/net/java/javamoney/ri/ext/spi/RegionalCurrencyUnitProviderSpi.java
  144. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/format/common/AbstractTargeted.java
  145. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/format/common/ParseContext.java
  146. 0 ... money-impl}/ri/src/main/java/net/java/javamoney/ri/format/provider/ItemFormatterFactoryImpl.java
  147. 0 ...i → money-impl}/ri/src/main/java/net/java/javamoney/ri/format/provider/ItemParserFactoryImpl.java
  148. 0 ...money-impl}/ri/src/main/java/net/java/javamoney/ri/format/provider/format/IsoAmountFormatter.java
  149. 0 ...mpl}/ri/src/main/java/net/java/javamoney/ri/format/provider/format/IsoAmountFormatterFactory.java
  150. 0 ...ney-impl}/ri/src/main/java/net/java/javamoney/ri/format/provider/format/IsoCurrencyFormatter.java
  151. 0 ...l}/ri/src/main/java/net/java/javamoney/ri/format/provider/format/IsoCurrencyFormatterFactory.java
  152. 0 ...→ money-impl}/ri/src/main/java/net/java/javamoney/ri/format/provider/parse/IsoCurrencyParser.java
  153. 0 ...-impl}/ri/src/main/java/net/java/javamoney/ri/format/provider/parse/IsoCurrencyParserFactory.java
  154. 0 ...y-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/format/spi/ItemFormatterFactorySpi.java
  155. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/format/spi/ItemParserFactorySpi.java
  156. 0 ...ey-impl}/ri/src/main/java/net/java/javamoney/ri/format/tokenformatter/AbstractFormatterToken.java
  157. 0 ...-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/format/tokenformatter/CurrencyToken.java
  158. 0 ...i → money-impl}/ri/src/main/java/net/java/javamoney/ri/format/tokenformatter/FormattedAmount.java
  159. 0 ...i → money-impl}/ri/src/main/java/net/java/javamoney/ri/format/tokenformatter/FormattedNumber.java
  160. 0 ...ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/format/tokenformatter/FormatterToken.java
  161. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/format/tokenformatter/Literal.java
  162. 0 ...ey-impl}/ri/src/main/java/net/java/javamoney/ri/format/tokenformatter/TokenizedItemFormatter.java
  163. 0 ...→ money-impl}/ri/src/main/java/net/java/javamoney/ri/format/tokenformatter/TranslatedLiteral.java
  164. 0 ... money-impl}/ri/src/main/java/net/java/javamoney/ri/format/tokenformatter/ZeroValueDecorator.java
  165. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/format/tokenparser/ParserToken.java
  166. 0 {money-ri → money-impl}/ri/src/main/java/net/java/javamoney/ri/format/util/StringGrouper.java
  167. 0 {money-ri → money-impl}/ri/src/main/resources/META-INF/beans.xml
  168. 0 ...y-ri → money-impl}/ri/src/main/resources/META-INF/services/javax.money.convert.ConversionProvider
  169. 0 ...ri → money-impl}/ri/src/main/resources/META-INF/services/javax.money.convert.ExchangeRateProvider
  170. 0 ...impl}/ri/src/main/resources/META-INF/services/javax.money.convert.spi.CurrencyConverterFactorySpi
  171. 0 ...-ri → money-impl}/ri/src/main/resources/META-INF/services/javax.money.format.ItemFormatterFactory
  172. 0 {money-ri → money-impl}/ri/src/main/resources/META-INF/services/javax.money.format.ItemParserFactory
  173. 0 ...i → money-impl}/ri/src/main/resources/META-INF/services/javax.money.provider.CurrencyUnitProvider
  174. 0 ... → money-impl}/ri/src/main/resources/META-INF/services/javax.money.provider.MonetaryAmountFactory
  175. 0 ...→ money-impl}/ri/src/main/resources/META-INF/services/javax.money.provider.MonetaryAmountProvider
  176. 0 ...ey-ri → money-impl}/ri/src/main/resources/META-INF/services/javax.money.provider.RoundingProvider
  177. 0 ...l}/ri/src/main/resources/META-INF/services/net.java.javamoney.ri.core.spi.CurrencyUnitProviderSpi
  178. 0 .../ri/src/main/resources/META-INF/services/net.java.javamoney.ri.format.spi.ItemFormatterFactorySpi
  179. 0 ...pl}/ri/src/main/resources/META-INF/services/net.java.javamoney.ri.format.spi.ItemParserFactorySpi
  180. 0 {money-ri → money-impl}/ri/src/test/java/net/java/javamoney/ri/RITestBase.java
  181. 0 {money-ri → money-impl}/ri/src/test/java/net/java/javamoney/ri/SmokeTests.java
  182. 0 {money-ri → money-impl}/ri/src/test/java/net/java/javamoney/ri/convert/ConvertTestBase.java
  183. 0 {money-ri → money-impl}/ri/src/test/java/net/java/javamoney/ri/convert/CurrencyExchangeRateTest.java
  184. 0 {money-ri → money-impl}/ri/src/test/java/net/java/javamoney/ri/core/IntegralMoneyTest.java
  185. 0 {money-ri → money-impl}/ri/src/test/java/net/java/javamoney/ri/core/MoneyCurrencyTest.java
  186. 0 {money-ri → money-impl}/ri/src/test/java/net/java/javamoney/ri/core/MoneyCurrency_BuilderTest.java
  187. 0 {money-ri → money-impl}/ri/src/test/java/net/java/javamoney/ri/core/MoneyTest.java
  188. 0 {money-ri → money-impl}/ri/src/test/java/net/java/javamoney/ri/ext/RegionTypeImplTest.java
  189. 0 ...ey-ri → money-impl}/ri/src/test/java/net/java/javamoney/ri/format/TokenizedItemFormatterTest.java
  190. 0 {money-ri → money-impl}/ri/src/test/java/net/java/javamoney/ri/format/util/StringGrouperTest.java
  191. +1 −1 money-tck/pom.xml
  192. +41 −11 pom.xml
  193. +3 −0 src/etc/javamoney clean install.launch
  194. +3 −0 src/license/jcp_spec/header.txt
  195. +63 −0 src/license/jcp_spec/license.txt
  196. +12 −0 src/license/licenses.properties
  197. +55 −43 src/site/site.xml
  198. +12 −0 src/site/xdoc/index.xml
  199. +41 −29 src/site/xdoc/licensecover.xml
  200. +105 −93 src/site/xdoc/userguide.xml
View
126 LICENSE.txt
@@ -1,63 +1,63 @@
-CREDIT SUISSE IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS AGREEMENT. PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY IT, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE.
-
-Specification: <JSR-354 Money and Currency API > ("Specification")
-
-Version: 0.3
-
-Status: Spec Lead Draft
-
-Specification Lead: Credit Suisse ("Specification Lead")
-
-Release: March 15, 2013
-
-Copyright (c) 2012-2013, Credit Suisse
-All rights reserved.
-
-LIMITED LICENSE GRANTS
-
-1. License for Evaluation Purposes. Specification Lead hereby grants you a fully-paid, non-exclusive, non-transferable, worldwide, limited license (without the right to sublicense), under Specification Lead's applicable intellectual property rights to view, download, use and reproduce the Specification only for the purpose of internal evaluation. This includes (i) developing applications intended to run on an implementation of the Specification, provided that such applications do not themselves implement any portion(s) of the Specification, and (ii) discussing the Specification with any third party; and (iii) excerpting brief portions of the Specification in oral or written communications which discuss the Specification provided that such excerpts do not in the aggregate constitute a significant portion of the Specification.
-
-2. License for the Distribution of Compliant Implementations. Specification Lead also grants you a perpetual, non-exclusive, non-transferable, worldwide, fully paid-up, royalty free, limited license (without the right to sublicense) under any applicable copyrights or, subject to the provisions of subsection 4 below, patent rights it may have covering the Specification to create and/or distribute an Independent Implementation of the Specification that: (a) fully implements the Specification including all its required interfaces and functionality; (b) does not modify, subset, superset or otherwise extend the Licensor Name Space, or include any public or protected packages, classes, Java interfaces, fields or methods within the Licensor Name Space other than those required/authorized by the Specification or Specifications being implemented; and (c) passes the Technology Compatibility Kit (including satisfying the requirements of the applicable TCK Users Guide) for such Specification ("Compliant Implementation"). In addition, the foregoing license is expressly conditioned on your not acting outside its scope. No license is granted hereunder for any other purpose (including, for example, modifying the Specification, other than to the extent of your fair use rights, or distributing the Specification to third parties). Also, no right, title, or interest in or to any trademarks, service marks, or trade names of Specification Lead or Specification Lead's licensors is granted hereunder. Java, and Java-related logos, marks and names are trademarks or registered trademarks of Oracle America, Inc. in the U.S. and other countries.
-
-3. Pass-through Conditions. You need not include limitations (a)-(c) from the previous paragraph or any other particular "pass through" requirements in any license You grant concerning the use of your Independent Implementation or products derived from it. However, except with respect to Independent Implementations (and products derived from them) that satisfy limitations (a)-(c) from the previous paragraph, You may neither: (a) grant or otherwise pass through to your licensees any licenses under Specification Lead's applicable intellectual property rights; nor (b) authorize your licensees to make any claims concerning their implementation's compliance with the Specification in question.
-
-4. Reciprocity Concerning Patent Licenses.
-
- a. With respect to any patent claims covered by the license granted under subparagraph 2 above that would be infringed by all technically feasible implementations of the Specification, such license is conditioned upon your offering on fair, reasonable and non-discriminatory terms, to any party seeking it from You, a perpetual, non-exclusive, non-transferable, worldwide license under Your patent rights which are or would be infringed by all technically feasible implementations of the Specification to develop, distribute and use a Compliant Implementation.
-
- b With respect to any patent claims owned by Specification Lead and covered by the license granted under subparagraph 2, whether or not their infringement can be avoided in a technically feasible manner when implementing the Specification, such license shall terminate with respect to such claims if You initiate a claim against Specification Lead that it has, in the course of performing its responsibilities as the Specification Lead, induced any other entity to infringe Your patent rights.
-
- c Also with respect to any patent claims owned by Specification Lead and covered by the license granted under subparagraph 2 above, where the infringement of such claims can be avoided in a technically feasible manner when implementing the Specification such license, with respect to such claims, shall terminate if You initiate a claim against Specification Lead that its making, having made, using, offering to sell, selling or importing a Compliant Implementation infringes Your patent rights.
-
-5. Definitions. For the purposes of this Agreement: "Independent Implementation" shall mean an implementation of the Specification that neither derives from any of Specification Lead's source code or binary code materials nor, except with an appropriate and separate license from Specification Lead, includes any of Specification Lead's source code or binary code materials; "Licensor Name Space" shall mean the public class or interface declarations whose names begin with "java", "javax", "com.<Specification Lead>" or their equivalents in any subsequent naming convention adopted by Oracle through the Java Community Process, or any recognized successors or replacements thereof; and "Technology Compatibility Kit" or "TCK" shall mean the test suite and accompanying TCK User's Guide provided by Specification Lead which corresponds to the Specification and that was available either (i) from Specification Lead's 120 days before the first release of Your Independent Implementation that allows its use for commercial purposes, or (ii) more recently than 120 days from such release but against which You elect to test Your implementation of the Specification.
-
-This Agreement will terminate immediately without notice from Specification Lead if you breach the Agreement or act outside the scope of the licenses granted above.
-
-DISCLAIMER OF WARRANTIES
-
-THE SPECIFICATION IS PROVIDED "AS IS". SPECIFICATION LEAD MAKES NO REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT (INCLUDING AS A CONSEQUENCE OF ANY PRACTICE OR IMPLEMENTATION OF THE SPECIFICATION), OR THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE. This document does not represent any commitment to release or implement any portion of the Specification in any product. In addition, the Specification could include technical inaccuracies or typographical errors.
-
-LIMITATION OF LIABILITY
-
-TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL SPECIFICATION LEAD OR ITS LICENSORS BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION, LOST REVENUE, PROFITS OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED IN ANY WAY TO YOUR HAVING, IMPELEMENTING OR OTHERWISE USING USING THE SPECIFICATION, EVEN IF SPECIFICATION LEAD AND/OR ITS LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-You will indemnify, hold harmless, and defend Specification Lead and its licensors from any claims arising or resulting from: (i) your use of the Specification; (ii) the use or distribution of your Java application, applet and/or implementation; and/or (iii) any claims that later versions or releases of any Specification furnished to you are incompatible with the Specification provided to you under this license.
-
-RESTRICTED RIGHTS LEGEND
-
-U.S. Government: If this Specification is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime contractor or subcontractor (at any tier), then the Government's rights in the Software and accompanying documentation shall be only as set forth in this license; this is in accordance with 48 C.F.R. 227.7201 through 227.7202-4 (for Department of Defense (DoD) acquisitions) and with 48 C.F.R. 2.101 and 12.212 (for non-DoD acquisitions).
-
-REPORT
-
-If you provide Specification Lead with any comments or suggestions concerning the Specification ("Feedback"), you hereby: (i) agree that such Feedback is provided on a non-proprietary and non-confidential basis, and (ii) grant Specification Lead a perpetual, non-exclusive, worldwide, fully paid-up, irrevocable license, with the right to sublicense through multiple levels of sublicensees, to incorporate, disclose, and use without limitation the Feedback for any purpose.
-
-GENERAL TERMS
-
-Any action related to this Agreement will be governed by California law and controlling U.S. federal law. The U.N. Convention for the International Sale of Goods and the choice of law rules of any jurisdiction will not apply.
-
-The Specification is subject to U.S. export control laws and may be subject to export or import regulations in other countries. Licensee agrees to comply strictly with all such laws and regulations and acknowledges that it has the responsibility to obtain such licenses to export, re-export or import as may be required after delivery to Licensee.
-
-This Agreement is the parties' entire agreement relating to its subject matter. It supersedes all prior or contemporaneous oral or written communications, proposals, conditions, representations and warranties and prevails over any conflicting or additional terms of any quote, order, acknowledgment, or other communication between the parties relating to its subject matter during the term of this Agreement. No modification to this Agreement will be binding, unless in writing and signed by an authorized representative of each party.
-
-
-
-Rev. April, 2006
+CREDIT SUISSE IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS AGREEMENT. PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY IT, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE.
+
+Specification: <JSR-354 Money and Currency API > ("Specification")
+
+Version: 0.3
+
+Status: Spec Lead Draft
+
+Specification Lead: Credit Suisse ("Specification Lead")
+
+Release: March 15, 2013
+
+Copyright (c) 2012-2013, Credit Suisse
+All rights reserved.
+
+LIMITED LICENSE GRANTS
+
+1. License for Evaluation Purposes. Specification Lead hereby grants you a fully-paid, non-exclusive, non-transferable, worldwide, limited license (without the right to sublicense), under Specification Lead's applicable intellectual property rights to view, download, use and reproduce the Specification only for the purpose of internal evaluation. This includes (i) developing applications intended to run on an implementation of the Specification, provided that such applications do not themselves implement any portion(s) of the Specification, and (ii) discussing the Specification with any third party; and (iii) excerpting brief portions of the Specification in oral or written communications which discuss the Specification provided that such excerpts do not in the aggregate constitute a significant portion of the Specification.
+
+2. License for the Distribution of Compliant Implementations. Specification Lead also grants you a perpetual, non-exclusive, non-transferable, worldwide, fully paid-up, royalty free, limited license (without the right to sublicense) under any applicable copyrights or, subject to the provisions of subsection 4 below, patent rights it may have covering the Specification to create and/or distribute an Independent Implementation of the Specification that: (a) fully implements the Specification including all its required interfaces and functionality; (b) does not modify, subset, superset or otherwise extend the Licensor Name Space, or include any public or protected packages, classes, Java interfaces, fields or methods within the Licensor Name Space other than those required/authorized by the Specification or Specifications being implemented; and (c) passes the Technology Compatibility Kit (including satisfying the requirements of the applicable TCK Users Guide) for such Specification ("Compliant Implementation"). In addition, the foregoing license is expressly conditioned on your not acting outside its scope. No license is granted hereunder for any other purpose (including, for example, modifying the Specification, other than to the extent of your fair use rights, or distributing the Specification to third parties). Also, no right, title, or interest in or to any trademarks, service marks, or trade names of Specification Lead or Specification Lead's licensors is granted hereunder. Java, and Java-related logos, marks and names are trademarks or registered trademarks of Oracle America, Inc. in the U.S. and other countries.
+
+3. Pass-through Conditions. You need not include limitations (a)-(c) from the previous paragraph or any other particular "pass through" requirements in any license You grant concerning the use of your Independent Implementation or products derived from it. However, except with respect to Independent Implementations (and products derived from them) that satisfy limitations (a)-(c) from the previous paragraph, You may neither: (a) grant or otherwise pass through to your licensees any licenses under Specification Lead's applicable intellectual property rights; nor (b) authorize your licensees to make any claims concerning their implementation's compliance with the Specification in question.
+
+4. Reciprocity Concerning Patent Licenses.
+
+ a. With respect to any patent claims covered by the license granted under subparagraph 2 above that would be infringed by all technically feasible implementations of the Specification, such license is conditioned upon your offering on fair, reasonable and non-discriminatory terms, to any party seeking it from You, a perpetual, non-exclusive, non-transferable, worldwide license under Your patent rights which are or would be infringed by all technically feasible implementations of the Specification to develop, distribute and use a Compliant Implementation.
+
+ b With respect to any patent claims owned by Specification Lead and covered by the license granted under subparagraph 2, whether or not their infringement can be avoided in a technically feasible manner when implementing the Specification, such license shall terminate with respect to such claims if You initiate a claim against Specification Lead that it has, in the course of performing its responsibilities as the Specification Lead, induced any other entity to infringe Your patent rights.
+
+ c Also with respect to any patent claims owned by Specification Lead and covered by the license granted under subparagraph 2 above, where the infringement of such claims can be avoided in a technically feasible manner when implementing the Specification such license, with respect to such claims, shall terminate if You initiate a claim against Specification Lead that its making, having made, using, offering to sell, selling or importing a Compliant Implementation infringes Your patent rights.
+
+5. Definitions. For the purposes of this Agreement: "Independent Implementation" shall mean an implementation of the Specification that neither derives from any of Specification Lead's source code or binary code materials nor, except with an appropriate and separate license from Specification Lead, includes any of Specification Lead's source code or binary code materials; "Licensor Name Space" shall mean the public class or interface declarations whose names begin with "java", "javax", "com.<Specification Lead>" or their equivalents in any subsequent naming convention adopted by Oracle through the Java Community Process, or any recognized successors or replacements thereof; and "Technology Compatibility Kit" or "TCK" shall mean the test suite and accompanying TCK User's Guide provided by Specification Lead which corresponds to the Specification and that was available either (i) from Specification Lead's 120 days before the first release of Your Independent Implementation that allows its use for commercial purposes, or (ii) more recently than 120 days from such release but against which You elect to test Your implementation of the Specification.
+
+This Agreement will terminate immediately without notice from Specification Lead if you breach the Agreement or act outside the scope of the licenses granted above.
+
+DISCLAIMER OF WARRANTIES
+
+THE SPECIFICATION IS PROVIDED "AS IS". SPECIFICATION LEAD MAKES NO REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT (INCLUDING AS A CONSEQUENCE OF ANY PRACTICE OR IMPLEMENTATION OF THE SPECIFICATION), OR THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE. This document does not represent any commitment to release or implement any portion of the Specification in any product. In addition, the Specification could include technical inaccuracies or typographical errors.
+
+LIMITATION OF LIABILITY
+
+TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL SPECIFICATION LEAD OR ITS LICENSORS BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION, LOST REVENUE, PROFITS OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED IN ANY WAY TO YOUR HAVING, IMPELEMENTING OR OTHERWISE USING USING THE SPECIFICATION, EVEN IF SPECIFICATION LEAD AND/OR ITS LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+You will indemnify, hold harmless, and defend Specification Lead and its licensors from any claims arising or resulting from: (i) your use of the Specification; (ii) the use or distribution of your Java application, applet and/or implementation; and/or (iii) any claims that later versions or releases of any Specification furnished to you are incompatible with the Specification provided to you under this license.
+
+RESTRICTED RIGHTS LEGEND
+
+U.S. Government: If this Specification is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime contractor or subcontractor (at any tier), then the Government's rights in the Software and accompanying documentation shall be only as set forth in this license; this is in accordance with 48 C.F.R. 227.7201 through 227.7202-4 (for Department of Defense (DoD) acquisitions) and with 48 C.F.R. 2.101 and 12.212 (for non-DoD acquisitions).
+
+REPORT
+
+If you provide Specification Lead with any comments or suggestions concerning the Specification ("Feedback"), you hereby: (i) agree that such Feedback is provided on a non-proprietary and non-confidential basis, and (ii) grant Specification Lead a perpetual, non-exclusive, worldwide, fully paid-up, irrevocable license, with the right to sublicense through multiple levels of sublicensees, to incorporate, disclose, and use without limitation the Feedback for any purpose.
+
+GENERAL TERMS
+
+Any action related to this Agreement will be governed by California law and controlling U.S. federal law. The U.N. Convention for the International Sale of Goods and the choice of law rules of any jurisdiction will not apply.
+
+The Specification is subject to U.S. export control laws and may be subject to export or import regulations in other countries. Licensee agrees to comply strictly with all such laws and regulations and acknowledges that it has the responsibility to obtain such licenses to export, re-export or import as may be required after delivery to Licensee.
+
+This Agreement is the parties' entire agreement relating to its subject matter. It supersedes all prior or contemporaneous oral or written communications, proposals, conditions, representations and warranties and prevails over any conflicting or additional terms of any quote, order, acknowledgment, or other communication between the parties relating to its subject matter during the term of this Agreement. No modification to this Agreement will be binding, unless in writing and signed by an authorized representative of each party.
+
+
+
+Rev. April, 2006
View
248 checkstyle.xml
@@ -1,124 +1,124 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
-
-<!--
- This configuration file was written by the eclipse-cs plugin configuration editor
--->
-<!--
- Checkstyle-Configuration: JSR 354
- Description: none
--->
-<module name="Checker">
- <property name="severity" value="warning"/>
- <module name="TreeWalker">
- <property name="tabWidth" value="4"/>
- <module name="FileContentsHolder"/>
- <module name="AvoidStarImport"/>
- <module name="EmptyBlock">
- <property name="tokens" value="LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_IF,LITERAL_FOR,LITERAL_TRY,LITERAL_WHILE,STATIC_INIT"/>
- </module>
- <module name="EmptyForInitializerPad">
- <property name="option" value="space"/>
- </module>
- <module name="EmptyForIteratorPad">
- <property name="option" value="space"/>
- </module>
- <module name="EqualsHashCode"/>
- <module name="IllegalImport"/>
- <module name="IllegalInstantiation">
- <property name="classes" value="Boolean"/>
- </module>
- <module name="InnerAssignment"/>
- <module name="JavadocType">
- <property name="scope" value="protected"/>
- </module>
- <module name="JavadocMethod">
- <property name="excludeScope" value="private"/>
- <property name="allowUndeclaredRTE" value="true"/>
- </module>
- <module name="JavadocVariable">
- <property name="excludeScope" value="private"/>
- </module>
- <module name="LeftCurly"/>
- <module name="LineLength">
- <property name="max" value="140"/>
- <property name="tabWidth" value="4"/>
- </module>
- <module name="LocalFinalVariableName"/>
- <module name="LocalVariableName"/>
- <module name="MemberName">
- <property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
- </module>
- <module name="MethodLength">
- <property name="max" value="300"/>
- </module>
- <module name="MethodName"/>
- <module name="ModifierOrder"/>
- <module name="NeedBraces"/>
- <module name="NoWhitespaceAfter"/>
- <module name="NoWhitespaceBefore">
- <property name="allowLineBreaks" value="true"/>
- <property name="tokens" value="SEMI,DOT,POST_DEC,POST_INC"/>
- </module>
- <module name="OperatorWrap">
- <property name="option" value="eol"/>
- <property name="tokens" value="ASSIGN, DIV_ASSIGN, PLUS_ASSIGN, MINUS_ASSIGN, STAR_ASSIGN, MOD_ASSIGN, SR_ASSIGN, BSR_ASSIGN, SL_ASSIGN, BXOR_ASSIGN, BOR_ASSIGN, BAND_ASSIGN"/>
- </module>
- <module name="PackageName"/>
- <module name="ParameterName"/>
- <module name="ParameterNumber">
- <property name="max" value="20"/>
- </module>
- <module name="ParenPad"/>
- <module name="RedundantImport"/>
- <module name="RedundantModifier"/>
- <module name="RightCurly"/>
- <module name="TypeName"/>
- <module name="TypecastParenPad"/>
- <module name="UpperEll"/>
- <module name="VisibilityModifier"/>
- <module name="WhitespaceAfter"/>
- <module name="WhitespaceAround">
- <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LCURLY,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND"/>
- <property name="allowEmptyConstructors" value="true"/>
- <property name="allowEmptyMethods" value="true"/>
- </module>
- <module name="MissingDeprecated"/>
- <module name="MissingOverride"/>
- <module name="PackageAnnotation"/>
- <module name="CovariantEquals"/>
- <module name="DefaultComesLast"/>
- <module name="ExplicitInitialization"/>
- <module name="FallThrough"/>
- <module name="InnerAssignment"/>
- <module name="StringLiteralEquality"/>
- <module name="GenericWhitespace"/>
- <module name="MethodParamPad"/>
- <module name="FinalClass"/>
- <module name="MutableException"/>
- <module name="ArrayTypeStyle"/>
- <module name="Indentation">
- <property name="basicOffset" value="4"/>
- <property name="caseIndent" value="4"/>
- </module>
- <module name="UncommentedMain"/>
- </module>
- <module name="SuppressionCommentFilter">
- <property name="offCommentFormat" value="CSOFF"/>
- <property name="onCommentFormat" value="CSON"/>
- </module>
- <module name="SuppressionFilter">
- <property name="file" value="${basedir}/checkstyle-suppressions.xml"/>
- </module>
- <module name="FileLength"/>
- <module name="FileTabCharacter">
- <property name="eachLine" value="true"/>
- <property name="severity" value="error"/>
- </module>
- <module name="NewlineAtEndOfFile"/>
- <module name="SuppressWithNearbyCommentFilter">
- <property name="commentFormat" value="CSIGNORE"/>
- <property name="checkFormat" value=".*"/>
- <property name="checkC" value="false"/>
- </module>
-</module>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+
+<!--
+ This configuration file was written by the eclipse-cs plugin configuration editor
+-->
+<!--
+ Checkstyle-Configuration: JSR 354
+ Description: none
+-->
+<module name="Checker">
+ <property name="severity" value="warning"/>
+ <module name="TreeWalker">
+ <property name="tabWidth" value="4"/>
+ <module name="FileContentsHolder"/>
+ <module name="AvoidStarImport"/>
+ <module name="EmptyBlock">
+ <property name="tokens" value="LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_IF,LITERAL_FOR,LITERAL_TRY,LITERAL_WHILE,STATIC_INIT"/>
+ </module>
+ <module name="EmptyForInitializerPad">
+ <property name="option" value="space"/>
+ </module>
+ <module name="EmptyForIteratorPad">
+ <property name="option" value="space"/>
+ </module>
+ <module name="EqualsHashCode"/>
+ <module name="IllegalImport"/>
+ <module name="IllegalInstantiation">
+ <property name="classes" value="Boolean"/>
+ </module>
+ <module name="InnerAssignment"/>
+ <module name="JavadocType">
+ <property name="scope" value="protected"/>
+ </module>
+ <module name="JavadocMethod">
+ <property name="excludeScope" value="private"/>
+ <property name="allowUndeclaredRTE" value="true"/>
+ </module>
+ <module name="JavadocVariable">
+ <property name="excludeScope" value="private"/>
+ </module>
+ <module name="LeftCurly"/>
+ <module name="LineLength">
+ <property name="max" value="140"/>
+ <property name="tabWidth" value="4"/>
+ </module>
+ <module name="LocalFinalVariableName"/>
+ <module name="LocalVariableName"/>
+ <module name="MemberName">
+ <property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
+ </module>
+ <module name="MethodLength">
+ <property name="max" value="300"/>
+ </module>
+ <module name="MethodName"/>
+ <module name="ModifierOrder"/>
+ <module name="NeedBraces"/>
+ <module name="NoWhitespaceAfter"/>
+ <module name="NoWhitespaceBefore">
+ <property name="allowLineBreaks" value="true"/>
+ <property name="tokens" value="SEMI,DOT,POST_DEC,POST_INC"/>
+ </module>
+ <module name="OperatorWrap">
+ <property name="option" value="eol"/>
+ <property name="tokens" value="ASSIGN, DIV_ASSIGN, PLUS_ASSIGN, MINUS_ASSIGN, STAR_ASSIGN, MOD_ASSIGN, SR_ASSIGN, BSR_ASSIGN, SL_ASSIGN, BXOR_ASSIGN, BOR_ASSIGN, BAND_ASSIGN"/>
+ </module>
+ <module name="PackageName"/>
+ <module name="ParameterName"/>
+ <module name="ParameterNumber">
+ <property name="max" value="20"/>
+ </module>
+ <module name="ParenPad"/>
+ <module name="RedundantImport"/>
+ <module name="RedundantModifier"/>
+ <module name="RightCurly"/>
+ <module name="TypeName"/>
+ <module name="TypecastParenPad"/>
+ <module name="UpperEll"/>
+ <module name="VisibilityModifier"/>
+ <module name="WhitespaceAfter"/>
+ <module name="WhitespaceAround">
+ <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LCURLY,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND"/>
+ <property name="allowEmptyConstructors" value="true"/>
+ <property name="allowEmptyMethods" value="true"/>
+ </module>
+ <module name="MissingDeprecated"/>
+ <module name="MissingOverride"/>
+ <module name="PackageAnnotation"/>
+ <module name="CovariantEquals"/>
+ <module name="DefaultComesLast"/>
+ <module name="ExplicitInitialization"/>
+ <module name="FallThrough"/>
+ <module name="InnerAssignment"/>
+ <module name="StringLiteralEquality"/>
+ <module name="GenericWhitespace"/>
+ <module name="MethodParamPad"/>
+ <module name="FinalClass"/>
+ <module name="MutableException"/>
+ <module name="ArrayTypeStyle"/>
+ <module name="Indentation">
+ <property name="basicOffset" value="4"/>
+ <property name="caseIndent" value="4"/>
+ </module>
+ <module name="UncommentedMain"/>
+ </module>
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="CSOFF"/>
+ <property name="onCommentFormat" value="CSON"/>
+ </module>
+ <module name="SuppressionFilter">
+ <property name="file" value="${basedir}/checkstyle-suppressions.xml"/>
+ </module>
+ <module name="FileLength"/>
+ <module name="FileTabCharacter">
+ <property name="eachLine" value="true"/>
+ <property name="severity" value="error"/>
+ </module>
+ <module name="NewlineAtEndOfFile"/>
+ <module name="SuppressWithNearbyCommentFilter">
+ <property name="commentFormat" value="CSIGNORE"/>
+ <property name="checkFormat" value=".*"/>
+ <property name="checkC" value="false"/>
+ </module>
+</module>
View
3,450 jdk-stub/src/main/java/javamoney/text/DecimalFormat.java
0 additions, 3,450 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
862 jdk-stub/src/main/java/javamoney/text/DecimalFormatSymbols.java
@@ -1,862 +0,0 @@
-/*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
-
-/*
- * (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved
- * (C) Copyright IBM Corp. 1996 - 1998 - All Rights Reserved
- *
- * The original version of this source code and documentation is copyrighted
- * and owned by Taligent, Inc., a wholly-owned subsidiary of IBM. These
- * materials are provided under terms of a License Agreement between Taligent
- * and Sun. This technology is protected by multiple US and International
- * patents. This notice and attribution to Taligent may not be removed.
- * Taligent is a registered trademark of Taligent, Inc.
- *
- */
-
-package javamoney.text;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.Serializable;
-import java.text.spi.DecimalFormatSymbolsProvider;
-import javamoney.util.Currency;
-
-import java.util.Arrays;
-import java.util.Locale;
-import java.util.ResourceBundle;
-import java.util.concurrent.ConcurrentHashMap;
-
-import sun.util.LocaleServiceProviderPool;
-import sun.util.resources.LocaleData;
-
-/**
- * This class represents the set of symbols (such as the decimal separator,
- * the grouping separator, and so on) needed by <code>DecimalFormat</code>
- * to format numbers. <code>DecimalFormat</code> creates for itself an instance of
- * <code>DecimalFormatSymbols</code> from its locale data. If you need to change any
- * of these symbols, you can get the <code>DecimalFormatSymbols</code> object from
- * your <code>DecimalFormat</code> and modify it.
- *
- * @see java.util.Locale
- * @see DecimalFormat
- * @author Mark Davis
- * @author Alan Liu
- */
-
-public class DecimalFormatSymbols implements Cloneable, Serializable {
-
- /**
- * Create a DecimalFormatSymbols object for the default locale.
- * This constructor can only construct instances for the locales
- * supported by the Java runtime environment, not for those
- * supported by installed
- * {@link java.text.spi.DecimalFormatSymbolsProvider DecimalFormatSymbolsProvider}
- * implementations. For full locale coverage, use the
- * {@link #getInstance(Locale) getInstance} method.
- */
- public DecimalFormatSymbols() {
- initialize( Locale.getDefault(Locale.Category.FORMAT) );
- }
-
- /**
- * Create a DecimalFormatSymbols object for the given locale.
- * This constructor can only construct instances for the locales
- * supported by the Java runtime environment, not for those
- * supported by installed
- * {@link java.text.spi.DecimalFormatSymbolsProvider DecimalFormatSymbolsProvider}
- * implementations. For full locale coverage, use the
- * {@link #getInstance(Locale) getInstance} method.
- *
- * @exception NullPointerException if <code>locale</code> is null
- */
- public DecimalFormatSymbols( Locale locale ) {
- initialize( locale );
- }
-
- /**
- * Returns an array of all locales for which the
- * <code>getInstance</code> methods of this class can return
- * localized instances.
- * The returned array represents the union of locales supported by the Java
- * runtime and by installed
- * {@link java.text.spi.DecimalFormatSymbolsProvider DecimalFormatSymbolsProvider}
- * implementations. It must contain at least a <code>Locale</code>
- * instance equal to {@link java.util.Locale#US Locale.US}.
- *
- * @return An array of locales for which localized
- * <code>DecimalFormatSymbols</code> instances are available.
- * @since 1.6
- */
- public static Locale[] getAvailableLocales() {
- LocaleServiceProviderPool pool =
- LocaleServiceProviderPool.getPool(DecimalFormatSymbolsProvider.class);
- return pool.getAvailableLocales();
- }
-
- /**
- * Gets the <code>DecimalFormatSymbols</code> instance for the default
- * locale. This method provides access to <code>DecimalFormatSymbols</code>
- * instances for locales supported by the Java runtime itself as well
- * as for those supported by installed
- * {@link java.text.spi.DecimalFormatSymbolsProvider
- * DecimalFormatSymbolsProvider} implementations.
- * @return a <code>DecimalFormatSymbols</code> instance.
- * @since 1.6
- */
- public static final DecimalFormatSymbols getInstance() {
- return getInstance(Locale.getDefault(Locale.Category.FORMAT));
- }
-
- /**
- * Gets the <code>DecimalFormatSymbols</code> instance for the specified
- * locale. This method provides access to <code>DecimalFormatSymbols</code>
- * instances for locales supported by the Java runtime itself as well
- * as for those supported by installed
- * {@link java.text.spi.DecimalFormatSymbolsProvider
- * DecimalFormatSymbolsProvider} implementations.
- * @param locale the desired locale.
- * @return a <code>DecimalFormatSymbols</code> instance.
- * @exception NullPointerException if <code>locale</code> is null
- * @since 1.6
- */
- public static final DecimalFormatSymbols getInstance(Locale locale) {
-
- // Check whether a provider can provide an implementation that's closer
- // to the requested locale than what the Java runtime itself can provide.
- LocaleServiceProviderPool pool =
- LocaleServiceProviderPool.getPool(DecimalFormatSymbolsProvider.class);
- if (pool.hasProviders()) {
- DecimalFormatSymbols providersInstance = pool.getLocalizedObject(
- DecimalFormatSymbolsGetter.INSTANCE, locale);
- if (providersInstance != null) {
- return providersInstance;
- }
- }
-
- return new DecimalFormatSymbols(locale);
- }
-
- /**
- * Gets the character used for zero. Different for Arabic, etc.
- */
- public char getZeroDigit() {
- return zeroDigit;
- }
-
- /**
- * Sets the character used for zero. Different for Arabic, etc.
- */
- public void setZeroDigit(char zeroDigit) {
- this.zeroDigit = zeroDigit;
- }
-
- /**
- * Gets the character used for thousands separator. Different for French, etc.
- */
- public char[] getGroupingSeparator() {
- if(groupingSeparator!=null){
- return groupingSeparator.clone();
- }
- return groupingSeparator;
- }
-
- /**
- * Sets the character used for thousands separator. Different for French, etc.
- */
- public void setGroupingSeparator(char... groupingSeparator) {
- this.groupingSeparator = groupingSeparator;
- }
-
- /**
- * Gets the flag, if the grouping size evaluation is inverse.
- */
- public boolean isInverseGrouping(){
- return inverseGrouping;
- }
-
- /**
- * Sets the flag, if the grouping size evaluation is inverse.
- */
- public void setInverseGrouping(boolean inverseGrouping) {
- this.inverseGrouping = inverseGrouping;
- }
-
- /**
- * Gets the character used for decimal sign. Different for French, etc.
- */
- public char getDecimalSeparator() {
- return decimalSeparator;
- }
-
- /**
- * Sets the character used for decimal sign. Different for French, etc.
- */
- public void setDecimalSeparator(char decimalSeparator) {
- this.decimalSeparator = decimalSeparator;
- }
-
- /**
- * Gets the character used for per mille sign. Different for Arabic, etc.
- */
- public char getPerMill() {
- return perMill;
- }
-
- /**
- * Sets the character used for per mille sign. Different for Arabic, etc.
- */
- public void setPerMill(char perMill) {
- this.perMill = perMill;
- }
-
- /**
- * Gets the character used for percent sign. Different for Arabic, etc.
- */
- public char getPercent() {
- return percent;
- }
-
- /**
- * Sets the character used for percent sign. Different for Arabic, etc.
- */
- public void setPercent(char percent) {
- this.percent = percent;
- }
-
- /**
- * Gets the character used for a digit in a pattern.
- */
- public char getDigit() {
- return digit;
- }
-
- /**
- * Sets the character used for a digit in a pattern.
- */
- public void setDigit(char digit) {
- this.digit = digit;
- }
-
- /**
- * Gets the character used to separate positive and negative subpatterns
- * in a pattern.
- */
- public char getPatternSeparator() {
- return patternSeparator;
- }
-
- /**
- * Sets the character used to separate positive and negative subpatterns
- * in a pattern.
- */
- public void setPatternSeparator(char patternSeparator) {
- this.patternSeparator = patternSeparator;
- }
-
- /**
- * Gets the string used to represent infinity. Almost always left
- * unchanged.
- */
- public String getInfinity() {
- return infinity;
- }
-
- /**
- * Sets the string used to represent infinity. Almost always left
- * unchanged.
- */
- public void setInfinity(String infinity) {
- this.infinity = infinity;
- }
-
- /**
- * Gets the string used to represent "not a number". Almost always left
- * unchanged.
- */
- public String getNaN() {
- return NaN;
- }
-
- /**
- * Sets the string used to represent "not a number". Almost always left
- * unchanged.
- */
- public void setNaN(String NaN) {
- this.NaN = NaN;
- }
-
- /**
- * Gets the character used to represent minus sign. If no explicit
- * negative format is specified, one is formed by prefixing
- * minusSign to the positive format.
- */
- public char getMinusSign() {
- return minusSign;
- }
-
- /**
- * Sets the character used to represent minus sign. If no explicit
- * negative format is specified, one is formed by prefixing
- * minusSign to the positive format.
- */
- public void setMinusSign(char minusSign) {
- this.minusSign = minusSign;
- }
-
- /**
- * Returns the currency symbol for the currency of these
- * DecimalFormatSymbols in their locale.
- * @since 1.2
- */
- public String getCurrencySymbol()
- {
- return currencySymbol;
- }
-
- /**
- * Sets the currency symbol for the currency of these
- * DecimalFormatSymbols in their locale.
- * @since 1.2
- */
- public void setCurrencySymbol(String currency)
- {
- currencySymbol = currency;
- }
-
- /**
- * Returns the ISO 4217 currency code of the currency of these
- * DecimalFormatSymbols.
- * @since 1.2
- */
- public String getInternationalCurrencySymbol()
- {
- return intlCurrencySymbol;
- }
-
- /**
- * Sets the ISO 4217 currency code of the currency of these
- * DecimalFormatSymbols.
- * If the currency code is valid (as defined by
- * {@link java.util.Currency#getInstance(java.lang.String) Currency.getInstance}),
- * this also sets the currency attribute to the corresponding Currency
- * instance and the currency symbol attribute to the currency's symbol
- * in the DecimalFormatSymbols' locale. If the currency code is not valid,
- * then the currency attribute is set to null and the currency symbol
- * attribute is not modified.
- *
- * @see #setCurrency
- * @see #setCurrencySymbol
- * @since 1.2
- */
- public void setInternationalCurrencySymbol(String currencyCode)
- {
- intlCurrencySymbol = currencyCode;
- currency = null;
- if (currencyCode != null) {
- try {
- currency = Currency.getInstance(currencyCode);
- currencySymbol = currency.getSymbol();
- } catch (IllegalArgumentException e) {
- }
- }
- }
-
- /**
- * Gets the currency of these DecimalFormatSymbols. May be null if the
- * currency symbol attribute was previously set to a value that's not
- * a valid ISO 4217 currency code.
- *
- * @return the currency used, or null
- * @since 1.4
- */
- public Currency getCurrency() {
- return currency;
- }
-
- /**
- * Sets the currency of these DecimalFormatSymbols.
- * This also sets the currency symbol attribute to the currency's symbol
- * in the DecimalFormatSymbols' locale, and the international currency
- * symbol attribute to the currency's ISO 4217 currency code.
- *
- * @param currency the new currency to be used
- * @exception NullPointerException if <code>currency</code> is null
- * @since 1.4
- * @see #setCurrencySymbol
- * @see #setInternationalCurrencySymbol
- */
- public void setCurrency(Currency currency) {
- if (currency == null) {
- throw new NullPointerException();
- }
- this.currency = currency;
- intlCurrencySymbol = currency.getCurrencyCode();
- currencySymbol = currency.getSymbol(locale);
- }
-
-
- /**
- * Returns the monetary decimal separator.
- * @since 1.2
- */
- public char getMonetaryDecimalSeparator()
- {
- return monetarySeparator;
- }
-
- /**
- * Sets the monetary decimal separator.
- * @since 1.2
- */
- public void setMonetaryDecimalSeparator(char sep)
- {
- monetarySeparator = sep;
- }
-
- //------------------------------------------------------------
- // BEGIN Package Private methods ... to be made public later
- //------------------------------------------------------------
-
- /**
- * Returns the character used to separate the mantissa from the exponent.
- */
- char getExponentialSymbol()
- {
- return exponential;
- }
- /**
- * Returns the string used to separate the mantissa from the exponent.
- * Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
- *
- * @return the exponent separator string
- * @see #setExponentSeparator(java.lang.String)
- * @since 1.6
- */
- public String getExponentSeparator()
- {
- return exponentialSeparator;
- }
-
- /**
- * Sets the character used to separate the mantissa from the exponent.
- */
- void setExponentialSymbol(char exp)
- {
- exponential = exp;
- }
-
- /**
- * Sets the string used to separate the mantissa from the exponent.
- * Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
- *
- * @param exp the exponent separator string
- * @exception NullPointerException if <code>exp</code> is null
- * @see #getExponentSeparator()
- * @since 1.6
- */
- public void setExponentSeparator(String exp)
- {
- if (exp == null) {
- throw new NullPointerException();
- }
- exponentialSeparator = exp;
- }
-
-
- //------------------------------------------------------------
- // END Package Private methods ... to be made public later
- //------------------------------------------------------------
-
- /**
- * Standard override.
- */
- public Object clone() {
- try {
- return (DecimalFormatSymbols)super.clone();
- // other fields are bit-copied
- } catch (CloneNotSupportedException e) {
- throw new InternalError();
- }
- }
-
- /**
- * Override equals.
- */
- public boolean equals(Object obj) {
- if (obj == null) return false;
- if (this == obj) return true;
- if (getClass() != obj.getClass()) return false;
- DecimalFormatSymbols other = (DecimalFormatSymbols) obj;
- return (zeroDigit == other.zeroDigit &&
- groupingSeparator == other.groupingSeparator &&
- decimalSeparator == other.decimalSeparator &&
- percent == other.percent &&
- perMill == other.perMill &&
- digit == other.digit &&
- minusSign == other.minusSign &&
- patternSeparator == other.patternSeparator &&
- infinity.equals(other.infinity) &&
- NaN.equals(other.NaN) &&
- currencySymbol.equals(other.currencySymbol) &&
- intlCurrencySymbol.equals(other.intlCurrencySymbol) &&
- currency == other.currency &&
- monetarySeparator == other.monetarySeparator &&
- exponentialSeparator.equals(other.exponentialSeparator) &&
- locale.equals(other.locale));
- }
-
- /**
- * Override hashCode.
- */
- public int hashCode() {
- int result = zeroDigit;
- result = result * 37 + Arrays.hashCode(groupingSeparator);
- result = result * 37 + decimalSeparator;
- return result;
- }
-
- /**
- * Initializes the symbols from the FormatData resource bundle.
- */
- private void initialize( Locale locale ) {
- this.locale = locale;
-
- // get resource bundle data - try the cache first
- boolean needCacheUpdate = false;
- Object[] data = cachedLocaleData.get(locale);
- if (data == null) { /* cache miss */
- // When numbering system is thai (Locale's extension contains u-nu-thai),
- // we read the data from th_TH_TH.
- Locale lookupLocale = locale;
- String numberType = locale.getUnicodeLocaleType("nu");
- if (numberType != null && numberType.equals("thai")) {
- lookupLocale = new Locale("th", "TH", "TH");
- }
- data = new Object[3];
- ResourceBundle rb = LocaleData.getNumberFormatData(lookupLocale);
- data[0] = rb.getStringArray("NumberElements");
- needCacheUpdate = true;
- }
-
- String[] numberElements = (String[]) data[0];
-
- decimalSeparator = numberElements[0].charAt(0);
- groupingSeparator = new char[]{numberElements[1].charAt(0)};
- patternSeparator = numberElements[2].charAt(0);
- percent = numberElements[3].charAt(0);
- zeroDigit = numberElements[4].charAt(0); //different for Arabic,etc.
- digit = numberElements[5].charAt(0);
- minusSign = numberElements[6].charAt(0);
- exponential = numberElements[7].charAt(0);
- exponentialSeparator = numberElements[7]; //string representation new since 1.6
- perMill = numberElements[8].charAt(0);
- infinity = numberElements[9];
- NaN = numberElements[10];
-
- // Try to obtain the currency used in the locale's country.
- // Check for empty country string separately because it's a valid
- // country ID for Locale (and used for the C locale), but not a valid
- // ISO 3166 country code, and exceptions are expensive.
- if (!"".equals(locale.getCountry())) {
- try {
- currency = Currency.getInstance(locale);
- } catch (IllegalArgumentException e) {
- // use default values below for compatibility
- }
- }
- if (currency != null) {
- intlCurrencySymbol = currency.getCurrencyCode();
- if (data[1] != null && data[1] == intlCurrencySymbol) {
- currencySymbol = (String) data[2];
- } else {
- currencySymbol = currency.getSymbol(locale);
- data[1] = intlCurrencySymbol;
- data[2] = currencySymbol;
- needCacheUpdate = true;
- }
- } else {
- // default values
- intlCurrencySymbol = "XXX";
- try {
- currency = Currency.getInstance(intlCurrencySymbol);
- } catch (IllegalArgumentException e) {
- }
- currencySymbol = "\u00A4";
- }
- // Currently the monetary decimal separator is the same as the
- // standard decimal separator for all locales that we support.
- // If that changes, add a new entry to NumberElements.
- monetarySeparator = decimalSeparator;
-
- if (needCacheUpdate) {
- cachedLocaleData.putIfAbsent(locale, data);
- }
- }
-
- /**
- * Reads the default serializable fields, provides default values for objects
- * in older serial versions, and initializes non-serializable fields.
- * If <code>serialVersionOnStream</code>
- * is less than 1, initializes <code>monetarySeparator</code> to be
- * the same as <code>decimalSeparator</code> and <code>exponential</code>
- * to be 'E'.
- * If <code>serialVersionOnStream</code> is less than 2,
- * initializes <code>locale</code>to the root locale, and initializes
- * If <code>serialVersionOnStream</code> is less than 3, it initializes
- * <code>exponentialSeparator</code> using <code>exponential</code>.
- * Sets <code>serialVersionOnStream</code> back to the maximum allowed value so that
- * default serialization will work properly if this object is streamed out again.
- * Initializes the currency from the intlCurrencySymbol field.
- *
- * @since JDK 1.1.6
- */
- private void readObject(ObjectInputStream stream)
- throws IOException, ClassNotFoundException {
- stream.defaultReadObject();
- if (serialVersionOnStream < 1) {
- // Didn't have monetarySeparator or exponential field;
- // use defaults.
- monetarySeparator = decimalSeparator;
- exponential = 'E';
- }
- if (serialVersionOnStream < 2) {
- // didn't have locale; use root locale
- locale = Locale.ROOT;
- }
- if (serialVersionOnStream < 3) {
- // didn't have exponentialSeparator. Create one using exponential
- exponentialSeparator = Character.toString(exponential);
- }
- serialVersionOnStream = currentSerialVersion;
-
- if (intlCurrencySymbol != null) {
- try {
- currency = Currency.getInstance(intlCurrencySymbol);
- } catch (IllegalArgumentException e) {
- }
- }
- }
-
- /**
- * Character used for zero.
- *
- * @serial
- * @see #getZeroDigit
- */
- private char zeroDigit;
-
- /**
- * Character used for thousands separator.
- *
- * @serial
- * @see #getGroupingSeparator
- */
- private char[] groupingSeparator;
-
- /**
- * Flag to inverse the evaluation of the grouping size from a pattern.
- */
- private boolean inverseGrouping;
-
- /**
- * Character used for decimal sign.
- *
- * @serial
- * @see #getDecimalSeparator
- */
- private char decimalSeparator;
-
- /**
- * Character used for per mille sign.
- *
- * @serial
- * @see #getPerMill
- */
- private char perMill;
-
- /**
- * Character used for percent sign.
- * @serial
- * @see #getPercent
- */
- private char percent;
-
- /**
- * Character used for a digit in a pattern.
- *
- * @serial
- * @see #getDigit
- */
- private char digit;
-
- /**
- * Character used to separate positive and negative subpatterns
- * in a pattern.
- *
- * @serial
- * @see #getPatternSeparator
- */
- private char patternSeparator;
-
- /**
- * String used to represent infinity.
- * @serial
- * @see #getInfinity
- */
- private String infinity;
-
- /**
- * String used to represent "not a number".
- * @serial
- * @see #getNaN
- */
- private String NaN;
-
- /**
- * Character used to represent minus sign.
- * @serial
- * @see #getMinusSign
- */
- private char minusSign;
-
- /**
- * String denoting the local currency, e.g. "$".
- * @serial
- * @see #getCurrencySymbol
- */
- private String currencySymbol;
-
- /**
- * ISO 4217 currency code denoting the local currency, e.g. "USD".
- * @serial
- * @see #getInternationalCurrencySymbol
- */
- private String intlCurrencySymbol;
-
- /**
- * The decimal separator used when formatting currency values.
- * @serial
- * @since JDK 1.1.6
- * @see #getMonetaryDecimalSeparator
- */
- private char monetarySeparator; // Field new in JDK 1.1.6
-
- /**
- * The character used to distinguish the exponent in a number formatted
- * in exponential notation, e.g. 'E' for a number such as "1.23E45".
- * <p>
- * Note that the public API provides no way to set this field,
- * even though it is supported by the implementation and the stream format.
- * The intent is that this will be added to the API in the future.
- *
- * @serial
- * @since JDK 1.1.6
- */
- private char exponential; // Field new in JDK 1.1.6
-
- /**
- * The string used to separate the mantissa from the exponent.
- * Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
- * <p>
- * If both <code>exponential</code> and <code>exponentialSeparator</code>
- * exist, this <code>exponentialSeparator</code> has the precedence.
- *
- * @serial
- * @since 1.6
- */
- private String exponentialSeparator; // Field new in JDK 1.6
-
- /**
- * The locale of these currency format symbols.
- *
- * @serial
- * @since 1.4
- */
- private Locale locale;
-
- // currency; only the ISO code is serialized.
- private transient Currency currency;
-
- // Proclaim JDK 1.1 FCS compatibility
- static final long serialVersionUID = 5772796243397350300L;
-
- // The internal serial version which says which version was written
- // - 0 (default) for version up to JDK 1.1.5
- // - 1 for version from JDK 1.1.6, which includes two new fields:
- // monetarySeparator and exponential.
- // - 2 for version from J2SE 1.4, which includes locale field.
- // - 3 for version from J2SE 1.6, which includes exponentialSeparator field.
- private static final int currentSerialVersion = 3;
-
- /**
- * Describes the version of <code>DecimalFormatSymbols</code> present on the stream.
- * Possible values are:
- * <ul>
- * <li><b>0</b> (or uninitialized): versions prior to JDK 1.1.6.
- *
- * <li><b>1</b>: Versions written by JDK 1.1.6 or later, which include
- * two new fields: <code>monetarySeparator</code> and <code>exponential</code>.
- * <li><b>2</b>: Versions written by J2SE 1.4 or later, which include a
- * new <code>locale</code> field.
- * <li><b>3</b>: Versions written by J2SE 1.6 or later, which include a
- * new <code>exponentialSeparator</code> field.
- * </ul>
- * When streaming out a <code>DecimalFormatSymbols</code>, the most recent format
- * (corresponding to the highest allowable <code>serialVersionOnStream</code>)
- * is always written.
- *
- * @serial
- * @since JDK 1.1.6
- */
- private int serialVersionOnStream = currentSerialVersion;
-
- /**
- * cache to hold the NumberElements and the Currency
- * of a Locale.
- */
- private static final ConcurrentHashMap<Locale, Object[]> cachedLocaleData = new ConcurrentHashMap<Locale, Object[]>(3);
-
- /**
- * Obtains a DecimalFormatSymbols instance from a DecimalFormatSymbolsProvider
- * implementation.
- */
- private static class DecimalFormatSymbolsGetter
- implements LocaleServiceProviderPool.LocalizedObjectGetter<DecimalFormatSymbolsProvider,
- DecimalFormatSymbols> {
- private static final DecimalFormatSymbolsGetter INSTANCE =
- new DecimalFormatSymbolsGetter();
-
- public DecimalFormatSymbols getObject(
- DecimalFormatSymbolsProvider decimalFormatSymbolsProvider,
- Locale locale,
- String key,
- Object... params) {
- assert params.length == 0;
- //return decimalFormatSymbolsProvider.getInstance(locale);
- return null; // TODO implement (-> JDK)
- }
- }
-}
View
57 money-api/convert/pom.xml
@@ -1,29 +1,30 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>money-api</artifactId>
- <groupId>javax.money</groupId>
- <version>0.3-SNAPSHOT</version>
- </parent>
- <artifactId>money-api-convert</artifactId>
- <name>JSR 354 (Money and Currency) - Conversion API</name>
- <packaging>bundle</packaging>
- <dependencies>
- <dependency>
- <groupId>javax.money</groupId>
- <artifactId>money-api-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <!-- ======================================================= -->
- <!-- Packaging (OSGi bundle) -->
- <!-- ======================================================= -->
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>money-api</artifactId>
+ <groupId>javax.money</groupId>
+ <version>0.3-SNAPSHOT</version>
+ </parent>
+ <artifactId>money-api-convert</artifactId>
+ <name>JSR 354 (Money and Currency) - Conversion API</name>
+ <packaging>bundle</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>javax.money</groupId>
+ <artifactId>money-api-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <!-- ======================================================= -->
+ <!-- Packaging (OSGi bundle) -->
+ <!-- ======================================================= -->
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
</project>
View
3 money-api/convert/src/etc/header.txt
@@ -0,0 +1,3 @@
+CREDIT SUISSE IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS AGREEMENT. PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY IT, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE.
+
+Specification: <JSR-354 Money and Currency API > ("Specification")
View
32 money-api/convert/src/main/java/javax/money/convert/ConversionProvider.java
@@ -1,33 +1,7 @@
-/*
- * Copyright (c) 2012-2013, Credit Suisse
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * * Neither the name of JSR-354 nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
+/**
+ * CREDIT SUISSE IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS AGREEMENT. PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY IT, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * Specification: <JSR-354 Money and Currency API > ("Specification")
*/
package javax.money.convert;
View
32 money-api/convert/src/main/java/javax/money/convert/CurrencyConversionException.java
@@ -1,33 +1,7 @@
-/*
- * Copyright (c) 2012-2013, Credit Suisse
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * * Neither the name of JSR-354 nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
+/**
+ * CREDIT SUISSE IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS AGREEMENT. PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY IT, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * Specification: <JSR-354 Money and Currency API > ("Specification")
*/
package javax.money.convert;
View
32 money-api/convert/src/main/java/javax/money/convert/CurrencyConverter.java
@@ -1,33 +1,7 @@
-/*
- * Copyright (c) 2012-2013, Credit Suisse
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * * Neither the name of JSR-354 nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
+/**
+ * CREDIT SUISSE IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS AGREEMENT. PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY IT, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * Specification: <JSR-354 Money and Currency API > ("Specification")
*/
package javax.money.convert;
View
320 money-api/convert/src/main/java/javax/money/convert/ExchangeRate.java
@@ -1,173 +1,147 @@
-/*
- * Copyright (c) 2012-2013, Credit Suisse
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * * Neither the name of JSR-354 nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package javax.money.convert;
-
-import java.util.Enumeration;
-
-import javax.money.CurrencyUnit;
-
-/**
- * This interface models a exchange rate between two currencies.
- *
- * @author Werner Keil
- * @author Anatole Tresch
- * @version 0.2.2
- */
-public interface ExchangeRate {
-
- /**
- * Access the type of exchange rate.
- *
- * @return the type of this rate, never null.
- */
- public ExchangeRateType getExchangeRateType();
-
- /**
- * Get the source currency.
- *
- * @return the source currency.
- */
- public CurrencyUnit getSource();
-
- /**
- * Get the target currency.
- *
- * @return the target currency.
- */
- public CurrencyUnit getTarget();
-
- /**
- * Access the rate's factor.
- *
- * @return the factor for this exchange rate.
- */
- public Number getFactor();
-
- /**
- * Returns the UTC timestamp defining from what date/time this rate is
- * valid.
- *
- * @return The UTC timestamp of the rate, defining valid from, or
- * {@code null}.
- */
- public Long getValidFrom();
-
- /**
- * Get the data validity timestamp of this rate in milliseconds. This can be
- * useful, when a rate in a system only should be used within some specified
- * time.
- *
- * @return the duration of validity in milliseconds, or {@code null} if no
- * validity constraints apply.
- */
- public Long getValidUntil();
-
- /**
- * Allows to check if a rate is still valid according to its data validity
- * timestamp.
- *
- * @see #getValidUntil()
- * @return true, if the rate is valid for use.
- */
- public boolean isValid();
-
- /**
- * Get the provider of this rate. The provider of a rate can have different
- * contexts in different usage scenarios, such as the service type or the
- * stock exchange.
- *
- * @return the provider, or {code null}.
- */
- public String getProvider();
-
- /**
- * Access the chain of exchange rates.
- *
- * @return the chain of rates, in case of a derived rate, this may be
- * several instances. For a direct exchange rate, this equals to
- * <code>new ConversionRate[]{this}</code>.
- */
- public ExchangeRate[] getExchangeRateChain();
-
- /**
- * Allows to evaluate if this exchange rate is a derived exchange rate.
- * Derived exchange rates are defined by an ordered list of subconversions
- * with intermediate steps, whereas a direct conversion is possible in one
- * steps.
- *
- * @return true, if the exchange rate is derived.
- */
- public boolean isDerived();
-
- /**
- * Checks if a conversion is an identity.
- *
- * @param sourceCurrency
- * The source currency
- * @param targetCurrency
- * The target currency
- * @return true, if the conversion is linear.
- * @throws CurrencyConversionException
- * if conversion failed, or the required data is not available.
- */
- public boolean isIdentity();
-
- /**
- * Access additional attributes of this currency instance. This allows to
- * add additional codes or extended information by SPI providers. For
- * instance there are ISO currency codes existing that may represented by
- * different country specific currencies. The detailed country can be added
- * as an attribute here.
- *
- * @param key
- * The attribute's key, never null.
- * @return the according attribute value, or null.
- */
- public <T> T getAttribute(String key, Class<T> type);
-
- /**
- * Access the extended attributes defined.
- *
- * @return the attribute key available, never null.
- */
- public Enumeration<String> getAttributeKeys();
-
- /**
- * Access the type of an attribute.
- *
- * @param key
- * The attribute key
- * @return the attribute's value class, or null.
- */
- public Class<?> getAttributeType(String key);
-
-}
+/**
+ * CREDIT SUISSE IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS AGREEMENT. PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY IT, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE.
+ *
+ * Specification: <JSR-354 Money and Currency API > ("Specification")
+ */
+package javax.money.convert;
+
+import java.util.Enumeration;
+
+import javax.money.CurrencyUnit;
+
+/**
+ * This interface models a exchange rate between two currencies.
+ *
+ * @author Werner Keil
+ * @author Anatole Tresch
+ * @version 0.2.2
+ */
+public interface ExchangeRate {
+
+ /**
+ * Access the type of exchange rate.
+ *
+ * @return the type of this rate, never null.
+ */
+ public ExchangeRateType getExchangeRateType();
+
+ /**
+ * Get the source currency.
+ *
+ * @return the source currency.
+ */
+ public CurrencyUnit getSource();
+
+ /**
+ * Get the target currency.
+ *
+ * @return the target currency.
+ */
+ public CurrencyUnit getTarget();
+
+ /**
+ * Access the rate's factor.
+ *
+ * @return the factor for this exchange rate.
+ */
+ public Number getFactor();
+
+ /**
+ * Returns the UTC timestamp defining from what date/time this rate is
+ * valid.
+ *
+ * @return The UTC timestamp of the rate, defining valid from, or
+ * {@code null}.
+ */
+ public Long getValidFrom();
+
+ /**
+ * Get the data validity timestamp of this rate in milliseconds. This can be
+ * useful, when a rate in a system only should be used within some specified
+ * time.
+ *
+ * @return the duration of validity in milliseconds, or {@code null} if no
+ * validity constraints apply.
+ */
+ public Long getValidUntil();
+
+ /**
+ * Allows to check if a rate is still valid according to its data validity
+ * timestamp.
+ *
+ * @see #getValidUntil()
+ * @return true, if the rate is valid for use.
+ */
+ public boolean isValid();
+
+ /**
+ * Get the provider of this rate. The provider of a rate can have different
+ * contexts in different usage scenarios, such as the service type or the
+ * stock exchange.
+ *
+ * @return the provider, or {code null}.
+ */
+ public String getProvider();
+
+ /**
+ * Access the chain of exchange rates.
+ *
+ * @return the chain of rates, in case of a derived rate, this may be
+ * several instances. For a direct exchange rate, this equals to
+ * <code>new ConversionRate[]{this}</code>.
+ */
+ public ExchangeRate[] getExchangeRateChain();
+
+ /**
+ * Allows to evaluate if this exchange rate is a derived exchange rate.
+ * Derived exchange rates are defined by an ordered list of subconversions
+ * with intermediate steps, whereas a direct conversion is possible in one
+ * steps.
+ *
+ * @return true, if the exchange rate is derived.
+ */
+ public boolean isDerived();
+
+ /**
+ * Checks if a conversion is an identity.
+ *
+ * @param sourceCurrency
+ * The source currency
+ * @param targetCurrency
+ * The target currency
+ * @return true, if the conversion is linear.
+ * @throws CurrencyConversionException
+ * if conversion failed, or the required data is not available.
+ */
+ public boolean isIdentity();
+
+ /**
+ * Access additional attributes of this currency instance. This allows to
+ * add additional codes or extended information by SPI providers. For
+ * instance there are ISO currency codes existing that may represented by
+ * different country specific currencies. The detailed country can be added
+ * as an attribute here.
+ *
+ * @param key
+ * The attribute's key, never null.
+ * @return the according attribute value, or null.
+ */
+ public <T> T getAttribute(String key, Class<T> type);
+
+ /**
+ * Access the extended attributes defined.
+ *
+ * @return the attribute key available, never null.
+ */
+ public Enumeration<String> getAttributeKeys();
+
+ /**
+ * Access the type of an attribute.
+ *
+ * @param key
+ * The attribute key
+ * @return the attribute's value class, or null.
+ */
+ public Class<?> getAttributeType(String key);
+
+}
View
32 money-api/convert/src/main/java/javax/money/convert/ExchangeRateProvider.java
@@ -1,33 +1,7 @@
-/*
- * Copyright (c) 2012-2013, Credit Suisse
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * * Neither the name of JSR-354 nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
+/**
+ * CREDIT SUISSE IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS AGREEMENT. PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY IT, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * Specification: <JSR-354 Money and Currency API > ("Specification")
*/
package javax.money.convert;
View
32 money-api/convert/src/main/java/javax/money/convert/ExchangeRateType.java
@@ -1,33 +1,7 @@
-/*
- * Copyright (c) 2012-2013, Credit Suisse
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * * Neither the name of JSR-354 nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
+/**
+ * CREDIT SUISSE IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS AGREEMENT. PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY IT, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * Specification: <JSR-354 Money and Currency API > ("Specification")
*/
package javax.money.convert;
View
43 money-api/core/pom.xml
@@ -1,22 +1,23 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>money-api</artifactId>
- <groupId>javax.money</groupId>
- <version>0.3-SNAPSHOT</version>
- </parent>
- <artifactId>money-api-core</artifactId>
- <name>JSR 354 (Money and Currency) - API Core</name>
- <packaging>bundle</packaging>
- <build>
- <plugins>
- <!-- ======================================================= -->
- <!-- Packaging (OSGi bundle) -->
- <!-- ======================================================= -->
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>money-api</artifactId>
+ <groupId>javax.money</groupId>
+ <version>0.3-SNAPSHOT</version>
+ </parent>
+ <artifactId>money-api-core</artifactId>
+ <name>JSR 354 (Money and Currency) - API Core</name>
+ <packaging>bundle</packaging>
+ <build>
+ <plugins>
+ <!-- ======================================================= -->
+ <!-- Packaging (OSGi bundle) -->
+ <!-- ======================================================= -->
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
</project>
View
3 money-api/core/src/etc/header.txt
@@ -0,0 +1,3 @@
+CREDIT SUISSE IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS AGREEMENT. PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY IT, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE.
+
+Specification: <JSR-354 Money and Currency API > ("Specification")
View
32 money-api/core/src/main/java/javax/money/CurrencyMismatchException.java
@@ -1,33 +1,7 @@
-/*
- * Copyright (c) 2012-2013, Credit Suisse
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * * Neither the name of JSR-354 nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
+/**
+ * CREDIT SUISSE IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS AGREEMENT. PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY IT, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * Specification: <JSR-354 Money and Currency API > ("Specification")
*/
package javax.money;
View
32 money-api/core/src/main/java/javax/money/CurrencyUnit.java
@@ -1,33 +1,7 @@
-/*
- * Copyright (c) 2012-2013, Credit Suisse
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright notice,