diff --git a/.circleci/config.yml b/.circleci/config.yml
index 838dd64b..a4dc2838 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -2,79 +2,45 @@
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
-version: 2.1
+version: 2
jobs:
clean:
docker:
# specify the version you desire here
- - image: cimg/openjdk:21.0.2
+ - image: circleci/openjdk:8-jdk
+
+ # Specify service dependencies here if necessary
+ # CircleCI maintains a library of pre-built images
+ # documented at https://circleci.com/docs/2.0/circleci-images/
+ # - image: circleci/postgres:9.4
working_directory: ~/repo
environment:
# Customize the JVM maximum heap limit
MAVEN_OPTS: -Xmx3200m
-
- steps:
- - checkout
-
- # run clean!
- - run:
- name: Cleaning workspace
- command: mvn clean
- # The resource_class feature allows configuring CPU and RAM resources for each job. Different resource classes are available for different executors. https://circleci.com/docs/2.0/configuration-reference/#resourceclass
- resource_class: large
- deployment:
- docker:
- # specify the version you desire here
- - image: cimg/openjdk:21.0.2
-
- working_directory: ~/repo
-
- environment:
- # Customize the JVM maximum heap limit
- MAVEN_OPTS: -Xmx3200m
-
+
steps:
- checkout
- # run deployment!
- - run:
- name: Deploying snapshot
- command: mvn deploy -Dmaven.test.skip -DcreateDocs=true -s settings.xml
- build:
- docker:
- # specify the version you desire here
- - image: cimg/openjdk:21.0.2
+ # Download and cache dependencies
+ - restore_cache:
+ keys:
+ - v1-dependencies-{{ checksum "pom.xml" }}
+ # fallback to using the latest cache if no exact match is found
+ - v1-dependencies-
- working_directory: ~/repo
-
- environment:
- # Customize the JVM maximum heap limit
- MAVEN_OPTS: -Xmx3200m
-
- steps:
- - checkout:
- method: full
-
- # run tests!
- - run:
- name: Running tests
- command: mvn test jacoco:report coveralls:report -DsourceEncoding=UTF-8
-
- # run code analysis using sonarqube
- - run:
- name: Running code analysis
- command: mvn -Psonar org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
+ - run: mvn dependency:go-offline
+ - save_cache:
+ paths:
+ - ~/.m2
+ key: v1-dependencies-{{ checksum "pom.xml" }}
+
+ # run clean!
+ - run: mvn clean
workflows:
version: 2
- clean_build_deploy:
+ clean_build:
jobs:
- - clean
- - build:
- requires:
- - clean
- - deployment:
- requires:
- - build
+ - clean
\ No newline at end of file
diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index 0e8498d5..00000000
--- a/.editorconfig
+++ /dev/null
@@ -1,44 +0,0 @@
-root = true
-
-[*]
-indent_style = space
-indent_size = 4
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-
-[*.java]
-indent_style = space
-indent_size = 4
-continuation_indent_size = 4
-
-[*.md]
-trim_trailing_whitespace = false
-
-[*.adoc]
-trim_trailing_whitespace = false
-
-[*.py]
-indent_style = space
-indent_size = 4
-
-[*.{js,css,html}]
-indent_style = space
-indent_size = 4
-insert_final_newline = false
-
-[*.yml]
-indent_style = space
-indent_size = 2
-
-[*.json]
-indent_style = space
-indent_size = 2
-
-[*.php]
-insert_final_newline = false
-
-[*.xml]
-indent_style = space
-indent_size = 4
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index 0e00f742..00000000
--- a/.gitattributes
+++ /dev/null
@@ -1,4 +0,0 @@
-# Explicitly declare text files to always be normalized and converted
-# to native line endings on checkout.
-*.java text
-*.xml text
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index 5134bcb0..00000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-# These are supported funding model platforms
-
-github: keilw
-patreon: # Replace with a single Patreon username
-open_collective: # Replace with a single Open Collective username
-ko_fi: # Replace with a single Ko-fi username
-tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
-community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
-liberapay: # Replace with a single Liberapay username
-issuehunt: # Replace with a single IssueHunt username
-otechie: # Replace with a single Otechie username
-custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/.gitignore b/.gitignore
index 13e39ee0..d0e510de 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,24 +1,7 @@
-# Java Files #
-*.class
-
-# Package Files #
-*.jar
-*.war
-*.ear
-
-# Output Folders #
-/target
-
-# Eclipse #
+/.settings/
+/target/
+/src/
/.classpath
/.project
-/.settings
-/bin/
-/site/
-
-# IntelliJ #
-.idea/
-*.iml
-
-# OS Files #
-.DS_Store
+/unit-api.iml
+/.idea/
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 15bea9fc..00000000
--- a/LICENSE
+++ /dev/null
@@ -1,29 +0,0 @@
-====
- Units of Measurement API
- Copyright (c) 2014-2020, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modification,
- are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. Neither the name of JSR-385 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 HOLDER 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.
-====
diff --git a/README.md b/README.md
deleted file mode 100644
index 0a644ea7..00000000
--- a/README.md
+++ /dev/null
@@ -1,40 +0,0 @@
-unit-api
-========
-
-[](https://javadoc.io/doc/javax.measure/unit-api)
-[](https://circleci.com/gh/unitsofmeasurement/unit-api/tree/master)
-[](https://www.codacy.com/gh/unitsofmeasurement/unit-api/dashboard?utm_source=github.com&utm_medium=referral&utm_content=unitsofmeasurement/unit-api&utm_campaign=Badge_Grade)
-[](https://coveralls.io/github/unitsofmeasurement/unit-api)
-
-[](http://opensource.org/licenses/BSD-3-Clause)
-[](http://stackoverflow.com/questions/tagged/units-of-measurement)
-[](https://gitter.im/unitsofmeasurement/unit-api?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-
-JSR 385 - Units of Measurement API 2.2
-
-The Unit of Measurement API provides a set of Java language programming interfaces for handling units and quantities.
-The interfaces provide a layer which separates client code, that would call the API, from library code, which implements the API.
-
-## Contribute
-[Contribution Guide](https://github.com/unitsofmeasurement/unit-api/wiki/Contribution-Guide)
-
-## Quality
-[](https://sonarcloud.io/dashboard?id=javax.measure%3Aunit-api)
-[](https://sonarcloud.io/dashboard?id=javax.measure%3Aunit-api)
-[](https://sonarcloud.io/dashboard?id=javax.measure%3Aunit-api)
-[](https://sonarcloud.io/dashboard?id=javax.measure%3Aunit-api)
-[](https://sonarcloud.io/dashboard?id=javax.measure%3Aunit-api)
-
-## Planning
-[](https://github.com/unitsofmeasurement/unit-api/issues)
-[](https://github.com/unitsofmeasurement/unit-api/issues?q=is%3Aissue+is%3Aclosed)
-
-[](https://github.com/unitsofmeasurement/unit-api/pulls)
-[](https://github.com/unitsofmeasurement/unit-api/pulls)
-
-[](https://github.com/unitsofmeasurement/unit-api/labels/prio%3A1)
-[](https://github.com/unitsofmeasurement/unit-api/labels/prio%3A2)
-[](https://github.com/unitsofmeasurement/unit-api/labels/prio%3A3)
\ No newline at end of file
diff --git a/docs/css/base.css b/css/base.css
similarity index 100%
rename from docs/css/base.css
rename to css/base.css
diff --git a/docs/css/prettify-themes/github.css b/css/prettify-themes/github.css
similarity index 100%
rename from docs/css/prettify-themes/github.css
rename to css/prettify-themes/github.css
diff --git a/docs/css/prettify-themes/hemisu-dark.css b/css/prettify-themes/hemisu-dark.css
similarity index 100%
rename from docs/css/prettify-themes/hemisu-dark.css
rename to css/prettify-themes/hemisu-dark.css
diff --git a/docs/css/prettify-themes/hemisu-light.css b/css/prettify-themes/hemisu-light.css
similarity index 100%
rename from docs/css/prettify-themes/hemisu-light.css
rename to css/prettify-themes/hemisu-light.css
diff --git a/docs/css/prettify-themes/tomorrow-night-blue.css b/css/prettify-themes/tomorrow-night-blue.css
similarity index 100%
rename from docs/css/prettify-themes/tomorrow-night-blue.css
rename to css/prettify-themes/tomorrow-night-blue.css
diff --git a/docs/css/prettify-themes/tomorrow-night-bright.css b/css/prettify-themes/tomorrow-night-bright.css
similarity index 100%
rename from docs/css/prettify-themes/tomorrow-night-bright.css
rename to css/prettify-themes/tomorrow-night-bright.css
diff --git a/docs/css/prettify-themes/tomorrow-night-eighties.css b/css/prettify-themes/tomorrow-night-eighties.css
similarity index 100%
rename from docs/css/prettify-themes/tomorrow-night-eighties.css
rename to css/prettify-themes/tomorrow-night-eighties.css
diff --git a/docs/css/prettify-themes/tomorrow-night.css b/css/prettify-themes/tomorrow-night.css
similarity index 100%
rename from docs/css/prettify-themes/tomorrow-night.css
rename to css/prettify-themes/tomorrow-night.css
diff --git a/docs/css/prettify-themes/tomorrow.css b/css/prettify-themes/tomorrow.css
similarity index 100%
rename from docs/css/prettify-themes/tomorrow.css
rename to css/prettify-themes/tomorrow.css
diff --git a/docs/css/prettify-themes/vibrant-ink.css b/css/prettify-themes/vibrant-ink.css
similarity index 100%
rename from docs/css/prettify-themes/vibrant-ink.css
rename to css/prettify-themes/vibrant-ink.css
diff --git a/docs/apidocs/allclasses-index.html b/docs/apidocs/allclasses-index.html
deleted file mode 100644
index 9bfd2c8b..00000000
--- a/docs/apidocs/allclasses-index.html
+++ /dev/null
@@ -1,294 +0,0 @@
-
-
-
-
-All Classes and Interfaces (Units of Measurement API 2.2 API)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
A system of units grouped together for historical or cultural reasons.
- Common system of units are "SI" (System International), "Imperial" (British), "US" (US Customary).
-Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces
-
-
Search
-
You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
-
-
j.l.obj will match "java.lang.Object"
-
InpStr will match "java.io.InputStream"
-
HM.cK will match "java.util.HashMap.containsKey(Object)"
-The following sections describe the different kinds of pages in this collection.
-
-
Overview
-
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
-
-
-
Package
-
Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
-
-
Interfaces
-
Classes
-
Enums
-
Exceptions
-
Errors
-
Annotation Types
-
-
-
-
Class or Interface
-
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
-
-
Class Inheritance Diagram
-
Direct Subclasses
-
All Known Subinterfaces
-
All Known Implementing Classes
-
Class or Interface Declaration
-
Class or Interface Description
-
-
-
-
Nested Class Summary
-
Enum Constant Summary
-
Field Summary
-
Property Summary
-
Constructor Summary
-
Method Summary
-
Required Element Summary
-
Optional Element Summary
-
-
-
-
Enum Constant Details
-
Field Details
-
Property Details
-
Constructor Details
-
Method Details
-
Element Details
-
-
Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
-
The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
-
-
-
Other Files
-
Packages and modules may contain pages with additional information related to the declarations nearby.
-
-
-
Use
-
Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
-
-
-
Tree (Class Hierarchy)
-
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.
-
-
When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
-
When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
-
-
-
-
Serialized Form
-
Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.
-
-
-
All Packages
-
The All Packages page contains an alphabetic index of all packages contained in the documentation.
-
-
-
All Classes and Interfaces
-
The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
-
-
-
Index
-
The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
-
-
-
-This help file applies to API documentation generated by the standard doclet.
-
-
Returns a system unit equivalent to this unscaled standard unit but used in expressions to distinguish between quantities of a different nature
- but of the same dimensions.
Casts this quantity to a parameterized unit of specified nature or throw a
- ClassCastException if the dimension of the specified quantity
- and this measure unit's dimension do not match.
Casts this unit to a parameterized unit of specified nature or throw a ClassCastException if the dimension of the specified quantity and
- this unit's dimension do not match.
Returns a Quantity that is the multiplicative inverse of this
- Quantity, having reciprocal value and reciprocal unit as given by
- this.getUnit().inverse().
Indicates whether this converter represents a (one-dimensional) linear transformation, that is
- a linear map (wikipedia) from a one-dimensional
- vector space (a scalar) to a one-dimensional vector space.
A system of units grouped together for historical or cultural reasons.
- Common system of units are "SI" (System International), "Imperial" (British), "US" (US Customary).
Returns the enum constant of this type with the specified name.
-The string must match exactly an identifier used to declare an
-enum constant in this type. (Extraneous whitespace characters are
-not permitted.)
-
-
Parameters:
-
name - the name of the enum constant to be returned.
Signals that a problem of some sort has occurred due to incommensurable of some quantities/units. Only commensurable quantity (quantities with the
- same dimensions) may be compared, equated, added, or subtracted. Also, one unit can be converted to another unit only if both units are
- commensurable.
-
- This is a checked exception, so it deliberately doesn't inherit from MeasurementException like most other exceptions.
-
Returns the enum constant of this type with the specified name.
-The string must match exactly an identifier used to declare an
-enum constant in this type. (Extraneous whitespace characters are
-not permitted.)
-
-
Parameters:
-
name - the name of the enum constant to be returned.
Returns the value of this prefix. If the exponent is different from 1, this value is the base part of the associated
- factor in base^exponent representation.
Exponent part of the associated factor in base^exponent representation. For different factors, e.g. rational numbers like 1/4
- the exponent is always 1.
Returns the enum constant of this type with the specified name.
-The string must match exactly an identifier used to declare an
-enum constant in this type. (Extraneous whitespace characters are
-not permitted.)
-
-
Parameters:
-
name - the name of the enum constant to be returned.
Represents a quantitative property of a phenomenon, body, or substance, that
- can be quantified by measurement. Mass,
- time, distance, heat, and angular separation are among the familiar examples
- of quantitative properties.
-
- This interface defines some arithmetic operations between Quantity
- instances. All implementations shall produce equivalent results for
- the same operation applied on equivalent quantities. Two quantities are
- equivalent if, after conversion to the same unit of measurement, they have
- the same numerical value (ignoring rounding errors). For example 2000 metres
- is equivalent to 2 km, but 2°C is not equivalent to 2 K; it is equivalent to
- 275.15 K instead. Above requirement applied to addition means that 2°C + 2 K
- shall be equivalent to 275.15 K + 2 K.
-
-
All operations shall preserve the
- basic laws
- of algebra, in particular commutativity of addition and
- multiplication (A + B = B + A)
- and associativity of addition and multiplication (A +
- B) + C = A + (B + C).
- In order to preserve those algebra laws, this specification requires all
- arithmetic operations to execute as is all operands were converted
- to system unit before the operation is
- carried out, and the result converted back to any compatible unit at
- implementation choice. For example 4 cm + 1 inch shall produce any result
- equivalent to 0.04 m + 0.0254 m.
-
-
Implementations are allowed to avoid conversion to system unit if the
- result is guaranteed to be equivalent. This is often the case when the
- conversion between quantity unit and system unit is only a
- scale factor. However this is not
- the case for conversions applying an offset or more complex formula.
- For example 2°C + 1°C = 274.15°C, not 3°C. This counter-intuitive result
- is essential for preserving algebra laws like associativity, and is also
- the expected result from a thermodynamic point of view.
-
-
-
API Note:
This interface places no restrictions on the mutability of
- implementations, however immutability is strongly recommended. All
- implementations must be Comparable.
Casts this quantity to a parameterized unit of specified nature or throw a
- ClassCastException if the dimension of the specified quantity
- and this measure unit's dimension do not match.
Returns a Quantity that is the multiplicative inverse of this
- Quantity, having reciprocal value and reciprocal unit as given by
- this.getUnit().inverse().
Returns the sum of this Quantity with the one specified.
- The result shall be as if this quantity and the given addend were
- converted to system unit before
- to be added, and the result converted back to the unit of this
- quantity or any other compatible unit at implementation choice.
Returns the difference between this Quantity and the one specified.
- The result shall be as if this quantity and the given subtrahend were
- converted to system unit before
- to be subtracted, and the result converted back to the unit of this
- quantity or any other compatible unit at implementation choice.
Returns the quotient of this Quantity divided by the Quantity
- specified.
- The result shall be as if this quantity and the given divisor were
- converted to system unit before
- to be divided, and the result converted back to the unit of this
- quantity or any other compatible unit at implementation choice.
-
-
Parameters:
-
divisor - the Quantity divisor.
-
Returns:
-
this / divisor.
-
Throws:
-
ClassCastException - if the type of an element in the specified operation is
- incompatible with this quantity
Returns the quotient of this Quantity divided by the Number
- specified.
- The result shall be as if this quantity was converted to
- system unit before to be divided,
- and the result converted back to the unit of this quantity or any
- other compatible unit at implementation choice.
Returns the product of this Quantity with the one specified.
- The result shall be as if this quantity and the given multiplicand were
- converted to system unit before
- to be multiplied, and the result converted back to the unit of this
- quantity or any other compatible unit at implementation choice.
-
-
Parameters:
-
multiplicand - the Quantity multiplicand.
-
Returns:
-
this * multiplicand.
-
Throws:
-
ClassCastException - if the type of an element in the specified operation is
- incompatible with this quantity
Returns the product of this Quantity with the Number value
- specified.
- The result shall be as if this quantity was converted to
- system unit before to be multiplied,
- and the result converted back to the unit of this quantity or any
- other compatible unit at implementation choice.
Returns a Quantity that is the multiplicative inverse of this
- Quantity, having reciprocal value and reciprocal unit as given by
- this.getUnit().inverse().
Casts this quantity to a parameterized unit of specified nature or throw a
- ClassCastException if the dimension of the specified quantity
- and this measure unit's dimension do not match. For example:
-
-
- Quantity<Length> length = Quantities.getQuantity("2 km").asType(Length.class);
- or
- Quantity<Speed> C = length.multiply(299792458).divide(second).asType(Speed.class);
-
-
-
-
Type Parameters:
-
T - The type of the quantity.
-
Parameters:
-
type - the quantity class identifying the nature of the quantity.
-
Returns:
-
this quantity parameterized with the specified type.
-
Throws:
-
ClassCastException - if the dimension of this unit is different from the specified
- quantity dimension.
Signals that a problem of some sort has occurred due to the impossibility of constructing a converter between two units. For example, the
- multiplication of offset units are usually units not convertible to their system unit.
Represents a determinate quantity (as of length, time, heat, or value) adopted as a standard of measurement.
-
-
- It is helpful to think of instances of this class as recording the history by which they are created. Thus, for example, the string "g/kg"
- (which is a dimensionless unit) would result from invoking the method toString() on a unit that was created by dividing a gram unit by a
- kilogram unit.
-
-
-
- This interface supports the multiplication of offsets units. The result is usually a unit not convertible to its system unit. Such units may appear in derivative quantities. For example Celsius per meter is an unit of gradient, which is common in atmospheric
- and oceanographic research.
-
-
-
- Units raised at non-integral powers are not supported. For example, LITRE.root(2) raises an ArithmeticException, but
- HECTARE.root(2) returns HECTOMETRE (100 metres).
-
Returns a system unit equivalent to this unscaled standard unit but used in expressions to distinguish between quantities of a different nature
- but of the same dimensions.
Casts this unit to a parameterized unit of specified nature or throw a ClassCastException if the dimension of the specified quantity and
- this unit's dimension do not match.
Returns the unscaled system unit from which this unit is derived. System units are either base units, alternate
- units or product of rational powers of system units.
-
-
- Because the system unit is unique by quantity type, it can be be used to identify the quantity given the unit. For example:
-
Indicates if this unit is compatible with the unit specified. Units don't need to be equal to be compatible. For example (assuming ONE
- is a dimensionless unit):
-
-
- RADIAN.equals(ONE) == false
- RADIAN.isCompatible(ONE) == true
- RADIAN.isEquivalentTo(ONE) doesn't compile
-
-
-
Parameters:
-
that - the other unit to compare for compatibility.
Indicates if this unit represents the same quantity than the given unit, ignoring name and symbols.
- Two units are equivalent if the conversion between them is identity.
-
-
- Unlike isCompatible(Unit) an equivalence check requires both units to be strictly type-compatible,
- because it makes no sense to compare e.g. gram and mm for equivalence.
- By contrast, the compatibility check can works across different quantity types.
-
-
-
Parameters:
-
that - the Unit<Q> to be compared with this instance.
Casts this unit to a parameterized unit of specified nature or throw a ClassCastException if the dimension of the specified quantity and
- this unit's dimension do not match. For example:
-
-
- Unit<Speed> C = METRE.multiply(299792458).divide(SECOND).asType(Speed.class);
-
-
-
Type Parameters:
-
T - The type of the quantity measured by the unit.
-
Parameters:
-
type - the quantity class identifying the nature of the unit.
-
Returns:
-
this unit parameterized with the specified type.
-
Throws:
-
ClassCastException - if the dimension of this unit is different from the specified quantity dimension.
Returns a converter of numeric values from this unit to another unit of same type. This method performs the same work as
- getConverterToAny(Unit) without raising checked exception.
-
-
Parameters:
-
that - the unit of same type to which to convert the numeric values.
Returns a converter from this unit to the specified unit of type unknown. This method can be used when the quantity type of the specified unit is
- unknown at compile-time or when dimensional analysis allows for conversion between units of different type.
-
-
- To convert to a unit having the same parameterized type, getConverterTo(Unit) is preferred (no checked exception raised).
-
-
-
Parameters:
-
that - the unit to which to convert the numeric values.
Returns a system unit equivalent to this unscaled standard unit but used in expressions to distinguish between quantities of a different nature
- but of the same dimensions.
-
-
Returns the result of setting the origin of the scale of measurement to the given value. The returned unit is convertible with all units that are
- convertible with this unit. For example the following code:
-
-
- CELSIUS = KELVIN.shift(273.15);
-
-
- creates a new unit where 0°C (the origin of the new unit) is equals to 273.15 K. Converting from the old unit to the new one is equivalent to
- subtracting the offset to the value in the old unit.
-
-
Parameters:
-
offset - the offset added (expressed in this unit).
Returns the result of setting the origin of the scale of measurement to the given value. The returned unit is convertible with all units that are
- convertible with this unit. For example the following code:
-
-
- CELSIUS = KELVIN.shift(273.15);
-
-
- creates a new unit where 0°C (the origin of the new unit) is equals to 273.15 K. Converting from the old unit to the new one is equivalent to
- subtracting the offset to the value in the old unit.
-
-
Parameters:
-
offset - the offset added (expressed in this unit).
Returns the result of multiplying this unit by the specified factor. If the factor is an integer value, the multiplication is exact
- (recommended). For example:
-
-
- FOOT = METRE.multiply(3048).divide(10000); // Exact definition.
- ELECTRON_MASS = KILOGRAM.multiply(9.10938188e-31); // Approximation.
-
Returns the result of multiplying this unit by the specified factor. For example:
-
-
- FOOT = METRE.multiply(3048).divide(10000); // Exact definition.
- ELECTRON_MASS = KILOGRAM.multiply(9.10938188e-31); // Approximation.
-
Returns the result of dividing this unit by a divisor. If the factor is an integer value, the division is exact. For example:
-
-
- GRAM = KILOGRAM.divide(1000); // Exact definition.
-
Returns a string representation of this unit. The string representation may be the unit symbol, or may be some
- representation of product units, multiplication factor and offset if any.
-
-
- The string may be localized at implementation choice by the means of a particular device and platform.
-
Indicates whether this converter represents a (one-dimensional) linear transformation, that is
- a linear map (wikipedia) from a one-dimensional
- vector space (a scalar) to a one-dimensional vector space.
Indicates whether this converter represents a (one-dimensional) linear transformation, that is
- a linear map (wikipedia) from a one-dimensional
- vector space (a scalar) to a one-dimensional vector space. Typically from 'R' to 'R', with 'R' the
- real numbers.
-
-
- Given such a 'linear' converter 'A', let 'u', 'v' and 'r' be arbitrary numbers, then the following
- must hold by definition:
-
-
-
A(u + v) == A(u) + A(v)
-
A(r * u) == r * A(u)
-
-
-
- Given a second 'linear' converter 'B', commutativity of composition follows by above definition:
-
-
-
(A o B) (u) == (B o A) (u)
-
-
- In other words, two 'linear' converters do have the property that A(B(u)) == B(A(u)), meaning
- for 'A' and 'B' the order of their composition does not matter. Expressed as Java code:
-
-
Concatenates this converter with another converter. The resulting converter is equivalent to first converting by the specified converter (right
- converter), and then converting by this converter (left converter).
-
-
Parameters:
-
converter - the other converter to concatenate with this converter.
-
Returns:
-
the concatenation of this converter with the other converter.
- Returns the steps of fundamental converters making up this converter or this if the converter is a fundamental converter.
-
-
- For example, converter1.getConversionSteps() returns converter1 while
- converter1.concatenate(converter2).getConversionSteps() returns converter1, converter2.
-
-
-
Returns:
-
the list of fundamental converters which concatenated make up this converter.
Casts this quantity to a parameterized unit of specified nature or throw a
- ClassCastException if the dimension of the specified quantity
- and this measure unit's dimension do not match.
Casts this unit to a parameterized unit of specified nature or throw a ClassCastException if the dimension of the specified quantity and
- this unit's dimension do not match.
Casts this quantity to a parameterized unit of specified nature or throw a
- ClassCastException if the dimension of the specified quantity
- and this measure unit's dimension do not match.
Returns a Quantity that is the multiplicative inverse of this
- Quantity, having reciprocal value and reciprocal unit as given by
- this.getUnit().inverse().
Returns a system unit equivalent to this unscaled standard unit but used in expressions to distinguish between quantities of a different nature
- but of the same dimensions.
Casts this unit to a parameterized unit of specified nature or throw a ClassCastException if the dimension of the specified quantity and
- this unit's dimension do not match.
Constructs a MeasurementParseException with the specified detail message, parsed text and index. A detail message is a String that describes
- this particular exception.
-
-
Parameters:
-
message - the detail message
-
parsedData - the parsed text, should not be null
-
position - the position where the error was found while parsing.
- Instances of this class are not required to be thread-safe. It is recommended to use separate format instances for each thread. If multiple threads
- access a format concurrently, it must be synchronized externally.
Parses a portion of the specified CharSequence from the specified position to produce a Quantity.
- If parsing succeeds, then the index of the pos argument is updated to the index after the last character used.
-
-
Parameters:
-
csq - the CharSequence to parse.
-
pos - a ParsePosition object holding the current parsing index and error parsing index information as described above.
-
Returns:
-
the quantity parsed from the specified character sub-sequence.
-
Throws:
-
MeasurementParseException - if any problem occurs while parsing the specified character sequence (e.g. illegal syntax).
Parses the specified CharSequence to produce a Quantity.
-
- The parse must complete normally and parse the entire text. If the parse completes without reading the entire length of the text, an exception
- is thrown. If any other problem occurs during parsing, an exception is thrown.
-
-
-
Parameters:
-
csq - the CharSequence to parse.
-
Returns:
-
the quantity parsed from the specified character sub-sequence.
-
Throws:
-
MeasurementParseException - if any problem occurs while parsing the specified character sequence (e.g. illegal syntax).
- Instances of this class are not required to be thread-safe. It is recommended to use separate format instances for each thread. If multiple threads
- access a format concurrently, it must be synchronized externally.
-
Attaches a system-wide label to the specified Unit.
-
- This method overrides the previous unit's label (e.g. label from unit database or unit system) as units may only have one label. Depending on the
- UnitFormat implementation, this call may be ignored if the particular unit already has a label.
-
- If a UnitFormat implementation is explicitly immutable, similar to e.g. the result of Collections.unmodifiableList(),
- then an UnsupportedOperationException may be thrown upon this call.
-
- Since UnitFormat implementations often apply the Singleton pattern, system-wide means, the label applies to every instance of
- UnitFormatA implementing UnitFormat in this case, but not every instance of UnitFormatB or UnitFormatC both
- also implementing UnitFormat. If a UnitFormat #isLocaleSensitive() it is up to the implementation, whether the label is
- ignored, applied in a local-neutral manner (in addition to its local-sensitive information) or locale-specific.
-
-
-
Parameters:
-
unit - the unit being labeled.
-
label - the new label for this unit.
-
Throws:
-
IllegalArgumentException - if the label is not a valid identifier. This may include characters not supported by a particular UnitFormat implementation
- (e.g. only ASCII characters for certain devices)
Parses a portion of the specified CharSequence from the specified position to produce a Unit.
- If parsing succeeds, then the index of the pos argument is updated to the index after the last character used.
-
-
Parameters:
-
csq - the CharSequence to parse.
-
pos - a ParsePosition object holding the current parsing index and error parsing index information as described above.
-
Returns:
-
the unit parsed from the specified character sub-sequence.
-
Throws:
-
MeasurementParseException - if any problem occurs while parsing the specified character sequence (e.g. illegal syntax).
- The parse must complete normally and parse the entire text. If the parse completes without reading the entire length of the text, an exception
- is thrown. If any other problem occurs during parsing, an exception is thrown.
-
-
-
Parameters:
-
csq - the CharSequence to parse.
-
Returns:
-
the unit parsed from the specified character sequence.
-
Throws:
-
MeasurementParseException - if any problem occurs while parsing the specified character sequence (e.g. illegal syntax).
Number of elementary entities (molecules, for example) of a substance. The metric system unit for this quantity is "mol" (mole).
-
- The mole, symbol mol, is the SI unit of amount of substance. One mole contains
- exactly 6.022 140 76 × 10²³ elementary entities. This number is the fixed numerical
- value of the Avogadro constant, NA, when expressed in the unit mol⁻¹ and is called
- the Avogadro number.
-
- The amount of substance, symbol n, of a system is a measure of the number of
- specified elementary entities. An elementary entity may be an atom, a molecule, an
- ion, an electron, any other particle or specified group of particles.
- This definition implies the exact relation Nₐ = 6.022 140 76 × 10²³ mol⁻¹.
-
- Inverting this relation gives an exact expression for the mole in terms of the defining constant NA:
-
- 1 mol = 6.02214076 × 10²³ / Nₐ
-
-
Amount of electric charge flowing past a specified circuit point per unit time. The metric system unit for this quantity is "A" (Ampere).
-
- The ampere, symbol A, is the SI unit of electric current. It is defined by taking the
- fixed numerical value of the elementary charge e to be 1.602 176 634 × 10⁻¹⁹ when
- expressed in the unit C, which is equal to A s, where the second is defined in terms
- of ∆νCs.
-
- This definition implies the exact relation e = 1.602 176 634 × 10⁻¹⁹ A s. Inverting this
- relation gives an exact expression for the unit ampere in terms of the defining constants e
- and ∆νCs:
-
- 1 A = (e / 1.602 176 634 × 10⁻¹⁹) s⁻¹
-
-
Quantity that tends to produce an acceleration of a body in the direction of its application. The metric system unit for this quantity is "N"
- (Newton).
Extent of something along its greatest dimension or the extent of space between two objects or places.
- The metric system unit for this quantity is "m" (metre).
-
- The metre, symbol m, is the SI unit of length. It is defined by taking the fixed
- numerical value of the speed of light in vacuum c to be 299 792 458 when expressed
- in the unit m s⁻¹, where the second is defined in terms of the caesium frequency
- ∆νCs.
-
- This definition implies the exact relation c = 299 792 458 m s⁻¹. Inverting this relation
- gives an exact expression for the metre in terms of the defining constants c and ∆νCs:
-
- 1 m = (c / 299 792 458)s = 9 192 631 770 c / 299 792 458 ∆νCs ≈ 30.663 319 c / ∆νCs
-
-
Luminous flux density per solid angle as measured in a given direction relative to the emitting source.
- The metric system unit for this quantity is "cd" (candela).
-
- The candela, symbol cd, is the SI unit of luminous intensity in a given direction. It is
- defined by taking the fixed numerical value of the luminous efficacy of
- monochromatic radiation of frequency 540 × 10¹² Hz, Kcd, to be 683 when expressed
- in the unit lm W−1, which is equal to cd sr W⁻¹, or cd sr kg⁻¹ m⁻² s³, where the kilogram,
- metre and second are defined in terms of h, c and ∆νCs.
-
- This definition implies the exact relation Kcd = 683 cd sr kg⁻¹ m⁻² s³ for monochromatic
- radiation of frequency ν = 540 × 10¹² Hz. Inverting this relation gives an exact expression
- for the candela in terms of the defining constants Kcd, h and ∆νCs:
-
- 1 cd = (Kcd / 683) kg m² s⁻³ sr⁻¹
-
-
Measure of the quantity of matter that a body or an object contains. The mass of the body is not dependent on gravity and therefore is different
- from but proportional to its weight. The metric system unit for this quantity is "kg" (kilogram).
-
- The kilogram, symbol kg, is the SI unit of mass. It is defined by taking the fixed
- numerical value of the Planck constant h to be 6.626 070 15 × 10⁻³⁴ when expressed
- in the unit J s, which is equal to kg m² s−1, where the metre and the second are
- defined in terms of c and ∆νCs.
-
- This definition implies the exact relation h = 6.626 070 15 × 10−34 kg m² s⁻¹. Inverting this
- relation gives an exact expression for the kilogram in terms of the three defining constants
- h, ∆νCs and c:
-
- 1 kg = (h / 6.626 070 15 × 10⁻³⁴) m⁻² s
-
-
Effective (or "equivalent") dose of radiation received by a human or some other living organism. The metric system unit for this quantity is "Sv"
- (Sievert).
Degree of hotness or coldness of a body or an environment. The metric system unit for this quantity is "K" (Kelvin).
-
- The kelvin, symbol K, is the SI unit of thermodynamic temperature. It is defined by
- taking the fixed numerical value of the Boltzmann constant k to be 1.380 649 × 10−²³
- when expressed in the unit J K⁻¹, which is equal to kg m² s⁻² K⁻¹, where the
- kilogram, metre and second are defined in terms of h, c and ∆νCs.
-
- This definition implies the exact relation k = 1.380 649 × 10⁻²³ kg m² s⁻² K⁻¹. Inverting this
- relation gives an exact expression for the kelvin in terms of the defining constants k, h and
- ∆νCs:
-
- 1 K = (1.380 649 / k) × 10⁻²³ kg m² s⁻²
-
-
Period of existence or persistence. The metric system unit for this quantity is "s" (second).
-
- The second, symbol s, is the SI unit of time. It is defined by taking the fixed
- numerical value of the caesium frequency ∆νCs, the unperturbed ground-state
- hyperfine transition frequency of the caesium 133 atom, to be 9 192 631 770 when
- expressed in the unit Hz, which is equal to s⁻¹.
-
- This definition implies the exact relation ∆νCs = 9 192 631 770 Hz. Inverting this relation
- gives an expression for the unit second in terms of the defining constant ∆νCs:
-
- 1 Hz = ∆νCs / 9 192 631 770 or 1 s = 9 192 631 770 / ∆νCs
-
-
[OPTIONAL] Provides quantitative properties or attributes of thing such as
- mass, time, distance, heat, and angular separation.
- Quantities of different kinds are represented by sub-types of the
- Quantity interface.
-
-
Only quantities defined in the BIPM - SI Brochure
- are provided here. Users can create their own quantity types by extending the
- Quantity interface.
-
-
This package supports measurable quantities, which can be expressed
- as (Number, Unit) tuples.
- Those tuples are not necessarily used directly in numerically intensive code.
- They are more useful as meta-data converted to the application internal representation
- (for example double primitive type with the requirement to provide values in meters)
- before computation begins.
-
-
Quantity sub-types are also used as parameterized type to characterize
- generic classes and provide additional compile time check. This technique is
- used extensively by the Unit interface,
- but users can apply the same approach to their own classes. In the example
- below, Sensor, MyQuantity and Vector3D are user-defined
- classes:
-
-
- // A general-purpose Sensor class used for temperature measurements:
- Sensor<Temperature> sensor ...;
- Temperature temp = sensor.getValue();
-
- // A vector of velocity in a three-dimensional space.
- Unit<Speed> = metrePerSecond = METRE.divide(SECOND);
- Vector3D<Speed> aircraftSpeed = new Vector3D(200.0, 50.0, -0.5, metrePerSecond);
-
-
-
This package holds only the quantities required by the metric system.
Returns the enum constant of this type with the specified name.
-The string must match exactly an identifier used to declare an
-enum constant in this type. (Extraneous whitespace characters are
-not permitted.)
-
-
Parameters:
-
name - the name of the enum constant to be returned.
Returns the default quantity format.
-
- It is up to implementations what to consider a suitable default. For some (locale-sensitive) implementations it may be a quantity format based on
- Locale.current() while others may return getQuantityFormat("Simple") or getQuantityFormat("ISO").
Returns the quantity format having the specified name or null if none.
-
- For example (@code getQuantityFormat("Simple")} to return the simple QuantityFormat implementation.
Returns the default unit format.
-
- It is up to implementations what to consider a suitable default. For some (locale-sensitive) implementations it may be a unit format based on
- Locale.current() while others may return getUnitFormat("Simple") or getUnitFormat("ISO").
Returns the unit format having the specified name or null if none.
-
- For example getUnitFormat("Simple") to return a simple UnitFormat implementation.
Returns the unit format having the specified name or null if none.
-
- For example getUnitFormat("Simple") to return a simple UnitFormat implementation.
- The variant is an arbitrary value to allow a variation of a UnitFormat,
- for example UTF vs. ASCII encoding of the simple UnitFormat
- or case sensitive vs. case insensitiveUCUM format.
-
If no variant is applicable, the UnitFormat matching the name only is returned.
-
-
Parameters:
-
name - the name of the format.
-
variant - any arbitrary value used to indicate a variation of a UnitFormat.
Allows to define a priority for a registered ServiceProvider instance.
- When multiple providers are registered in the system, the provider with the highest priority value is taken.
-
-
If the "jakarta.annotation.Priority" annotation (from Jakarta Annotations)
- or "javax.annotation.Priority" annotation (from JSR-250) is present on the ServiceProvider
- implementation class, then that annotation (first if both were present) is taken and this getPriority() method is ignored.
- Otherwise – if a Priority annotation is absent – this method is used as a fallback.
Returns the list of all service providers available for the current thread's context class loader.
- The current service provider is always the first item in the returned list.
- Other service providers after the first item may depend on the caller thread
- (see service loader API note).
-
-
Returns:
-
all service providers available for the current thread's context class loader.
Returns the ServiceProvider with the specified name.
- The given name must match the name of at least one service provider available in the current thread's
- context class loader.
- The service provider names are the values of "jakarta.inject.Named" (from Jakarta Annotations) or
- "javax.inject.Named" (from JSR-330) annotations when present (first if both were present),
- or the value of Object.toString() method for providers without Named annotation.
-
-
Implementors are encouraged to provide an Named annotation or to override Object.toString()
- and use a unique enough name, e.g. the class name or other distinct attributes.
- Should multiple service providers nevertheless use the same name, the one with the highest
- priority wins.
- If there are no providers available, an IllegalStateException is thrown.
- Otherwise the provider with the highest priority is used
- or the one explicitly designated via setCurrent(ServiceProvider).
-
A system of units grouped together for historical or cultural reasons.
- Common system of units are "SI" (System International), "Imperial" (British), "US" (US Customary). Nothing prevents a unit from belonging to
- several systems of units at the same time (for example an Imperial system would have many of the units held by the US Customary
- system).
Returns a read only view over the units explicitly defined by this system. This include the base and derived units which are assigned a special
- name and symbol. This set does not include new units created by arithmetic or other operations.
-
- The default implementation assumes that prefixes of the given type are implemented as an enumeration.
- This is the case of the two default prefix implementations provided in JSR 385,
- namely MetricPrefix and BinaryPrefix.
- Implementors shall override this method if they provide prefixes implemented in a different way.
A system of units grouped together for historical or cultural reasons.
- Common system of units are "SI" (System International), "Imperial" (British), "US" (US Customary).
A system of units grouped together for historical or cultural reasons.
- Common system of units are "SI" (System International), "Imperial" (British), "US" (US Customary).
This interface represents the service to obtain a system
- of units.
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/apidocs/jquery-ui.overrides.css b/docs/apidocs/jquery-ui.overrides.css
deleted file mode 100644
index facf852c..00000000
--- a/docs/apidocs/jquery-ui.overrides.css
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-.ui-state-active,
-.ui-widget-content .ui-state-active,
-.ui-widget-header .ui-state-active,
-a.ui-button:active,
-.ui-button:active,
-.ui-button.ui-state-active:hover {
- /* Overrides the color of selection used in jQuery UI */
- background: #F8981D;
- border: 1px solid #F8981D;
-}
diff --git a/docs/apidocs/legal/ADDITIONAL_LICENSE_INFO b/docs/apidocs/legal/ADDITIONAL_LICENSE_INFO
deleted file mode 100644
index b62cc3ef..00000000
--- a/docs/apidocs/legal/ADDITIONAL_LICENSE_INFO
+++ /dev/null
@@ -1 +0,0 @@
-Please see ..\java.base\ADDITIONAL_LICENSE_INFO
diff --git a/docs/apidocs/legal/ASSEMBLY_EXCEPTION b/docs/apidocs/legal/ASSEMBLY_EXCEPTION
deleted file mode 100644
index 0d4cfb40..00000000
--- a/docs/apidocs/legal/ASSEMBLY_EXCEPTION
+++ /dev/null
@@ -1 +0,0 @@
-Please see ..\java.base\ASSEMBLY_EXCEPTION
diff --git a/docs/apidocs/legal/LICENSE b/docs/apidocs/legal/LICENSE
deleted file mode 100644
index 4ad9fe40..00000000
--- a/docs/apidocs/legal/LICENSE
+++ /dev/null
@@ -1 +0,0 @@
-Please see ..\java.base\LICENSE
diff --git a/docs/apidocs/legal/jquery.md b/docs/apidocs/legal/jquery.md
deleted file mode 100644
index f7b72e3f..00000000
--- a/docs/apidocs/legal/jquery.md
+++ /dev/null
@@ -1,72 +0,0 @@
-## jQuery v3.6.0
-
-### jQuery License
-```
-jQuery v 3.6.0
-Copyright OpenJS Foundation and other contributors, https://openjsf.org/
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************
-
-The jQuery JavaScript Library v3.6.0 also includes Sizzle.js
-
-Sizzle.js includes the following license:
-
-Copyright JS Foundation and other contributors, https://js.foundation/
-
-This software consists of voluntary contributions made by many
-individuals. For exact contribution history, see the revision history
-available at https://github.com/jquery/sizzle
-
-The following license applies to all parts of this software except as
-documented below:
-
-====
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-====
-
-All files located in the node_modules and external directories are
-externally maintained libraries used by this software which have their
-own licenses; we recommend you read them, as their terms may differ from
-the terms above.
-
-*********************
-
-```
diff --git a/docs/apidocs/legal/jqueryUI.md b/docs/apidocs/legal/jqueryUI.md
deleted file mode 100644
index 8031bdb5..00000000
--- a/docs/apidocs/legal/jqueryUI.md
+++ /dev/null
@@ -1,49 +0,0 @@
-## jQuery UI v1.12.1
-
-### jQuery UI License
-```
-Copyright jQuery Foundation and other contributors, https://jquery.org/
-
-This software consists of voluntary contributions made by many
-individuals. For exact contribution history, see the revision history
-available at https://github.com/jquery/jquery-ui
-
-The following license applies to all parts of this software except as
-documented below:
-
-====
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-====
-
-Copyright and related rights for sample code are waived via CC0. Sample
-code is defined as all source code contained within the demos directory.
-
-CC0: http://creativecommons.org/publicdomain/zero/1.0/
-
-====
-
-All files located in the node_modules and external directories are
-externally maintained libraries used by this software which have their
-own licenses; we recommend you read them, as their terms may differ from
-the terms above.
-
-```
diff --git a/docs/apidocs/member-search-index.js b/docs/apidocs/member-search-index.js
deleted file mode 100644
index d54a2821..00000000
--- a/docs/apidocs/member-search-index.js
+++ /dev/null
@@ -1 +0,0 @@
-memberSearchIndex = [{"p":"javax.measure","c":"Quantity.Scale","l":"ABSOLUTE"},{"p":"javax.measure","c":"Quantity","l":"add(Quantity)","u":"add(javax.measure.Quantity)"},{"p":"javax.measure","c":"Unit","l":"alternate(String)","u":"alternate(java.lang.String)"},{"p":"javax.measure","c":"Quantity","l":"asType(Class)","u":"asType(java.lang.Class)"},{"p":"javax.measure","c":"Unit","l":"asType(Class)","u":"asType(java.lang.Class)"},{"p":"javax.measure","c":"MetricPrefix","l":"ATTO"},{"p":"javax.measure","c":"MetricPrefix","l":"ATTO(Unit)","u":"ATTO(javax.measure.Unit)"},{"p":"javax.measure.spi","c":"ServiceProvider","l":"available()"},{"p":"javax.measure","c":"MetricPrefix","l":"CENTI"},{"p":"javax.measure","c":"MetricPrefix","l":"CENTI(Unit)","u":"CENTI(javax.measure.Unit)"},{"p":"javax.measure","c":"UnitConverter","l":"concatenate(UnitConverter)","u":"concatenate(javax.measure.UnitConverter)"},{"p":"javax.measure","c":"UnitConverter","l":"convert(double)"},{"p":"javax.measure","c":"UnitConverter","l":"convert(Number)","u":"convert(java.lang.Number)"},{"p":"javax.measure.spi","c":"QuantityFactory","l":"create(Number, Unit)","u":"create(java.lang.Number,javax.measure.Unit)"},{"p":"javax.measure.spi","c":"QuantityFactory","l":"create(Number, Unit, Quantity.Scale)","u":"create(java.lang.Number,javax.measure.Unit,javax.measure.Quantity.Scale)"},{"p":"javax.measure.spi","c":"ServiceProvider","l":"current()"},{"p":"javax.measure","c":"MetricPrefix","l":"DECA"},{"p":"javax.measure","c":"MetricPrefix","l":"DECA(Unit)","u":"DECA(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"DECI"},{"p":"javax.measure","c":"MetricPrefix","l":"DECI(Unit)","u":"DECI(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"DEKA(Unit)","u":"DEKA(javax.measure.Unit)"},{"p":"javax.measure","c":"Dimension","l":"divide(Dimension)","u":"divide(javax.measure.Dimension)"},{"p":"javax.measure","c":"Unit","l":"divide(double)"},{"p":"javax.measure","c":"Quantity","l":"divide(Number)","u":"divide(java.lang.Number)"},{"p":"javax.measure","c":"Unit","l":"divide(Number)","u":"divide(java.lang.Number)"},{"p":"javax.measure","c":"Quantity","l":"divide(Quantity>)","u":"divide(javax.measure.Quantity)"},{"p":"javax.measure","c":"Unit","l":"divide(Unit>)","u":"divide(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"EXA"},{"p":"javax.measure","c":"MetricPrefix","l":"EXA(Unit)","u":"EXA(javax.measure.Unit)"},{"p":"javax.measure","c":"BinaryPrefix","l":"EXBI"},{"p":"javax.measure","c":"BinaryPrefix","l":"EXBI(Unit)","u":"EXBI(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"FEMTO"},{"p":"javax.measure","c":"MetricPrefix","l":"FEMTO(Unit)","u":"FEMTO(javax.measure.Unit)"},{"p":"javax.measure.format","c":"QuantityFormat","l":"format(Quantity>)","u":"format(javax.measure.Quantity)"},{"p":"javax.measure.format","c":"QuantityFormat","l":"format(Quantity>, Appendable)","u":"format(javax.measure.Quantity,java.lang.Appendable)"},{"p":"javax.measure.format","c":"UnitFormat","l":"format(Unit>)","u":"format(javax.measure.Unit)"},{"p":"javax.measure.format","c":"UnitFormat","l":"format(Unit>, Appendable)","u":"format(javax.measure.Unit,java.lang.Appendable)"},{"p":"javax.measure.spi","c":"FormatService","l":"getAvailableFormatNames(FormatService.FormatType)","u":"getAvailableFormatNames(javax.measure.spi.FormatService.FormatType)"},{"p":"javax.measure.spi","c":"SystemOfUnitsService","l":"getAvailableSystemsOfUnits()"},{"p":"javax.measure","c":"Dimension","l":"getBaseDimensions()"},{"p":"javax.measure","c":"Unit","l":"getBaseUnits()"},{"p":"javax.measure","c":"UnitConverter","l":"getConversionSteps()"},{"p":"javax.measure","c":"Unit","l":"getConverterTo(Unit)","u":"getConverterTo(javax.measure.Unit)"},{"p":"javax.measure","c":"Unit","l":"getConverterToAny(Unit>)","u":"getConverterToAny(javax.measure.Unit)"},{"p":"javax.measure","c":"Unit","l":"getDimension()"},{"p":"javax.measure","c":"BinaryPrefix","l":"getExponent()"},{"p":"javax.measure","c":"MetricPrefix","l":"getExponent()"},{"p":"javax.measure","c":"Prefix","l":"getExponent()"},{"p":"javax.measure.spi","c":"ServiceProvider","l":"getFormatService()"},{"p":"javax.measure","c":"BinaryPrefix","l":"getName()"},{"p":"javax.measure","c":"MetricPrefix","l":"getName()"},{"p":"javax.measure","c":"Prefix","l":"getName()"},{"p":"javax.measure.spi","c":"SystemOfUnits","l":"getName()"},{"p":"javax.measure","c":"Unit","l":"getName()"},{"p":"javax.measure.format","c":"MeasurementParseException","l":"getParsedString()"},{"p":"javax.measure.format","c":"MeasurementParseException","l":"getPosition()"},{"p":"javax.measure.spi","c":"SystemOfUnitsService","l":"getPrefixes(Class
)","u":"getPrefixes(java.lang.Class)"},{"p":"javax.measure.spi","c":"ServiceProvider","l":"getPriority()"},{"p":"javax.measure.spi","c":"ServiceProvider","l":"getQuantityFactory(Class)","u":"getQuantityFactory(java.lang.Class)"},{"p":"javax.measure.spi","c":"FormatService","l":"getQuantityFormat()"},{"p":"javax.measure.spi","c":"FormatService","l":"getQuantityFormat(String)","u":"getQuantityFormat(java.lang.String)"},{"p":"javax.measure","c":"Quantity","l":"getScale()"},{"p":"javax.measure","c":"BinaryPrefix","l":"getSymbol()"},{"p":"javax.measure","c":"MetricPrefix","l":"getSymbol()"},{"p":"javax.measure","c":"Prefix","l":"getSymbol()"},{"p":"javax.measure","c":"Unit","l":"getSymbol()"},{"p":"javax.measure.spi","c":"SystemOfUnitsService","l":"getSystemOfUnits()"},{"p":"javax.measure.spi","c":"SystemOfUnitsService","l":"getSystemOfUnits(String)","u":"getSystemOfUnits(java.lang.String)"},{"p":"javax.measure.spi","c":"ServiceProvider","l":"getSystemOfUnitsService()"},{"p":"javax.measure.spi","c":"QuantityFactory","l":"getSystemUnit()"},{"p":"javax.measure","c":"Unit","l":"getSystemUnit()"},{"p":"javax.measure","c":"Quantity","l":"getUnit()"},{"p":"javax.measure.spi","c":"SystemOfUnits","l":"getUnit(Class)","u":"getUnit(java.lang.Class)"},{"p":"javax.measure.spi","c":"SystemOfUnits","l":"getUnit(String)","u":"getUnit(java.lang.String)"},{"p":"javax.measure.spi","c":"FormatService","l":"getUnitFormat()"},{"p":"javax.measure.spi","c":"FormatService","l":"getUnitFormat(String)","u":"getUnitFormat(java.lang.String)"},{"p":"javax.measure.spi","c":"FormatService","l":"getUnitFormat(String, String)","u":"getUnitFormat(java.lang.String,java.lang.String)"},{"p":"javax.measure.spi","c":"SystemOfUnits","l":"getUnits()"},{"p":"javax.measure.spi","c":"SystemOfUnits","l":"getUnits(Dimension)","u":"getUnits(javax.measure.Dimension)"},{"p":"javax.measure","c":"BinaryPrefix","l":"getValue()"},{"p":"javax.measure","c":"MetricPrefix","l":"getValue()"},{"p":"javax.measure","c":"Prefix","l":"getValue()"},{"p":"javax.measure","c":"Quantity","l":"getValue()"},{"p":"javax.measure","c":"BinaryPrefix","l":"GIBI"},{"p":"javax.measure","c":"BinaryPrefix","l":"GIBI(Unit)","u":"GIBI(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"GIGA"},{"p":"javax.measure","c":"MetricPrefix","l":"GIGA(Unit)","u":"GIGA(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"HECTO"},{"p":"javax.measure","c":"MetricPrefix","l":"HECTO(Unit)","u":"HECTO(javax.measure.Unit)"},{"p":"javax.measure","c":"IncommensurableException","l":"IncommensurableException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"javax.measure","c":"IncommensurableException","l":"IncommensurableException(String, Throwable)","u":"%3Cinit%3E(java.lang.String,java.lang.Throwable)"},{"p":"javax.measure","c":"IncommensurableException","l":"IncommensurableException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"javax.measure","c":"Quantity","l":"inverse()"},{"p":"javax.measure","c":"Unit","l":"inverse()"},{"p":"javax.measure","c":"UnitConverter","l":"inverse()"},{"p":"javax.measure","c":"Unit","l":"isCompatible(Unit>)","u":"isCompatible(javax.measure.Unit)"},{"p":"javax.measure","c":"Quantity","l":"isEquivalentTo(Quantity)","u":"isEquivalentTo(javax.measure.Quantity)"},{"p":"javax.measure","c":"Unit","l":"isEquivalentTo(Unit)","u":"isEquivalentTo(javax.measure.Unit)"},{"p":"javax.measure","c":"UnitConverter","l":"isIdentity()"},{"p":"javax.measure","c":"UnitConverter","l":"isLinear()"},{"p":"javax.measure.format","c":"QuantityFormat","l":"isLocaleSensitive()"},{"p":"javax.measure.format","c":"UnitFormat","l":"isLocaleSensitive()"},{"p":"javax.measure","c":"BinaryPrefix","l":"KIBI"},{"p":"javax.measure","c":"BinaryPrefix","l":"KIBI(Unit)","u":"KIBI(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"KILO"},{"p":"javax.measure","c":"MetricPrefix","l":"KILO(Unit)","u":"KILO(javax.measure.Unit)"},{"p":"javax.measure.format","c":"UnitFormat","l":"label(Unit>, String)","u":"label(javax.measure.Unit,java.lang.String)"},{"p":"javax.measure","c":"MeasurementError","l":"MeasurementError()","u":"%3Cinit%3E()"},{"p":"javax.measure","c":"MeasurementError","l":"MeasurementError(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"javax.measure","c":"MeasurementError","l":"MeasurementError(String, Throwable)","u":"%3Cinit%3E(java.lang.String,java.lang.Throwable)"},{"p":"javax.measure","c":"MeasurementError","l":"MeasurementError(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"javax.measure","c":"MeasurementException","l":"MeasurementException()","u":"%3Cinit%3E()"},{"p":"javax.measure","c":"MeasurementException","l":"MeasurementException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"javax.measure","c":"MeasurementException","l":"MeasurementException(String, Throwable)","u":"%3Cinit%3E(java.lang.String,java.lang.Throwable)"},{"p":"javax.measure","c":"MeasurementException","l":"MeasurementException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"javax.measure.format","c":"MeasurementParseException","l":"MeasurementParseException(CharSequence, int)","u":"%3Cinit%3E(java.lang.CharSequence,int)"},{"p":"javax.measure.format","c":"MeasurementParseException","l":"MeasurementParseException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"javax.measure.format","c":"MeasurementParseException","l":"MeasurementParseException(String, CharSequence, int)","u":"%3Cinit%3E(java.lang.String,java.lang.CharSequence,int)"},{"p":"javax.measure.format","c":"MeasurementParseException","l":"MeasurementParseException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"javax.measure","c":"BinaryPrefix","l":"MEBI"},{"p":"javax.measure","c":"BinaryPrefix","l":"MEBI(Unit)","u":"MEBI(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"MEGA"},{"p":"javax.measure","c":"MetricPrefix","l":"MEGA(Unit)","u":"MEGA(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"MICRO"},{"p":"javax.measure","c":"MetricPrefix","l":"MICRO(Unit)","u":"MICRO(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"MILLI"},{"p":"javax.measure","c":"MetricPrefix","l":"MILLI(Unit)","u":"MILLI(javax.measure.Unit)"},{"p":"javax.measure","c":"Dimension","l":"multiply(Dimension)","u":"multiply(javax.measure.Dimension)"},{"p":"javax.measure","c":"Unit","l":"multiply(double)"},{"p":"javax.measure","c":"Quantity","l":"multiply(Number)","u":"multiply(java.lang.Number)"},{"p":"javax.measure","c":"Unit","l":"multiply(Number)","u":"multiply(java.lang.Number)"},{"p":"javax.measure","c":"Quantity","l":"multiply(Quantity>)","u":"multiply(javax.measure.Quantity)"},{"p":"javax.measure","c":"Unit","l":"multiply(Unit>)","u":"multiply(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"NANO"},{"p":"javax.measure","c":"MetricPrefix","l":"NANO(Unit)","u":"NANO(javax.measure.Unit)"},{"p":"javax.measure","c":"Quantity","l":"negate()"},{"p":"javax.measure.spi","c":"ServiceProvider","l":"of(String)","u":"of(java.lang.String)"},{"p":"javax.measure.format","c":"QuantityFormat","l":"parse(CharSequence)","u":"parse(java.lang.CharSequence)"},{"p":"javax.measure.format","c":"UnitFormat","l":"parse(CharSequence)","u":"parse(java.lang.CharSequence)"},{"p":"javax.measure.format","c":"QuantityFormat","l":"parse(CharSequence, ParsePosition)","u":"parse(java.lang.CharSequence,java.text.ParsePosition)"},{"p":"javax.measure.format","c":"UnitFormat","l":"parse(CharSequence, ParsePosition)","u":"parse(java.lang.CharSequence,java.text.ParsePosition)"},{"p":"javax.measure","c":"BinaryPrefix","l":"PEBI"},{"p":"javax.measure","c":"BinaryPrefix","l":"PEBI(Unit)","u":"PEBI(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"PETA"},{"p":"javax.measure","c":"MetricPrefix","l":"PETA(Unit)","u":"PETA(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"PICO"},{"p":"javax.measure","c":"MetricPrefix","l":"PICO(Unit)","u":"PICO(javax.measure.Unit)"},{"p":"javax.measure","c":"Dimension","l":"pow(int)"},{"p":"javax.measure","c":"Unit","l":"pow(int)"},{"p":"javax.measure","c":"Unit","l":"prefix(Prefix)","u":"prefix(javax.measure.Prefix)"},{"p":"javax.measure.spi","c":"FormatService.FormatType","l":"QUANTITY_FORMAT"},{"p":"javax.measure","c":"MetricPrefix","l":"QUECTO"},{"p":"javax.measure","c":"MetricPrefix","l":"QUECTO(Unit)","u":"QUECTO(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"QUETTA"},{"p":"javax.measure","c":"MetricPrefix","l":"QUETTA(Unit)","u":"QUETTA(javax.measure.Unit)"},{"p":"javax.measure","c":"Quantity.Scale","l":"RELATIVE"},{"p":"javax.measure","c":"MetricPrefix","l":"RONNA"},{"p":"javax.measure","c":"MetricPrefix","l":"RONNA(Unit)","u":"RONNA(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"RONTO"},{"p":"javax.measure","c":"MetricPrefix","l":"RONTO(Unit)","u":"RONTO(javax.measure.Unit)"},{"p":"javax.measure","c":"Dimension","l":"root(int)"},{"p":"javax.measure","c":"Unit","l":"root(int)"},{"p":"javax.measure.spi","c":"ServiceProvider","l":"ServiceProvider()","u":"%3Cinit%3E()"},{"p":"javax.measure.spi","c":"ServiceProvider","l":"setCurrent(ServiceProvider)","u":"setCurrent(javax.measure.spi.ServiceProvider)"},{"p":"javax.measure","c":"Unit","l":"shift(double)"},{"p":"javax.measure","c":"Unit","l":"shift(Number)","u":"shift(java.lang.Number)"},{"p":"javax.measure","c":"Quantity","l":"subtract(Quantity)","u":"subtract(javax.measure.Quantity)"},{"p":"javax.measure","c":"BinaryPrefix","l":"TEBI"},{"p":"javax.measure","c":"BinaryPrefix","l":"TEBI(Unit)","u":"TEBI(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"TERA"},{"p":"javax.measure","c":"MetricPrefix","l":"TERA(Unit)","u":"TERA(javax.measure.Unit)"},{"p":"javax.measure","c":"Quantity","l":"to(Unit)","u":"to(javax.measure.Unit)"},{"p":"javax.measure","c":"Unit","l":"toString()"},{"p":"javax.measure","c":"Quantity","l":"toSystemUnit()"},{"p":"javax.measure","c":"Unit","l":"transform(UnitConverter)","u":"transform(javax.measure.UnitConverter)"},{"p":"javax.measure","c":"UnconvertibleException","l":"UnconvertibleException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"javax.measure","c":"UnconvertibleException","l":"UnconvertibleException(String, Throwable)","u":"%3Cinit%3E(java.lang.String,java.lang.Throwable)"},{"p":"javax.measure","c":"UnconvertibleException","l":"UnconvertibleException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"javax.measure.spi","c":"FormatService.FormatType","l":"UNIT_FORMAT"},{"p":"javax.measure","c":"BinaryPrefix","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"javax.measure","c":"MetricPrefix","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"javax.measure","c":"Quantity.Scale","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"javax.measure.spi","c":"FormatService.FormatType","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"javax.measure","c":"BinaryPrefix","l":"values()"},{"p":"javax.measure","c":"MetricPrefix","l":"values()"},{"p":"javax.measure","c":"Quantity.Scale","l":"values()"},{"p":"javax.measure.spi","c":"FormatService.FormatType","l":"values()"},{"p":"javax.measure","c":"BinaryPrefix","l":"YOBI"},{"p":"javax.measure","c":"BinaryPrefix","l":"YOBI(Unit)","u":"YOBI(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"YOCTO"},{"p":"javax.measure","c":"MetricPrefix","l":"YOCTO(Unit)","u":"YOCTO(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"YOTTA"},{"p":"javax.measure","c":"MetricPrefix","l":"YOTTA(Unit)","u":"YOTTA(javax.measure.Unit)"},{"p":"javax.measure","c":"BinaryPrefix","l":"ZEBI"},{"p":"javax.measure","c":"BinaryPrefix","l":"ZEBI(Unit)","u":"ZEBI(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"ZEPTO"},{"p":"javax.measure","c":"MetricPrefix","l":"ZEPTO(Unit)","u":"ZEPTO(javax.measure.Unit)"},{"p":"javax.measure","c":"MetricPrefix","l":"ZETTA"},{"p":"javax.measure","c":"MetricPrefix","l":"ZETTA(Unit)","u":"ZETTA(javax.measure.Unit)"}];updateSearchResults();
\ No newline at end of file
diff --git a/docs/apidocs/module-search-index.js b/docs/apidocs/module-search-index.js
deleted file mode 100644
index 0d59754f..00000000
--- a/docs/apidocs/module-search-index.js
+++ /dev/null
@@ -1 +0,0 @@
-moduleSearchIndex = [];updateSearchResults();
\ No newline at end of file
diff --git a/docs/apidocs/overview-summary.html b/docs/apidocs/overview-summary.html
deleted file mode 100644
index da395c8e..00000000
--- a/docs/apidocs/overview-summary.html
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-Units of Measurement API 2.2 API
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure;
-031
-032/**
-033 * Provides support for common binary prefixes to be used by units. For example:
-034 * <pre>
-035 * {@code import static systems.uom.unicode.CLDR.*; // Static import (from Unicode System).
-036 * import static javax.measure.BinaryPrefix.*; // Static import.
-037 * import javax.measure.*;
-038 * import systems.uom.quantity.Information; // (from Systems Quantities)
-039 * ...
-040 * Unit<Information> MEBIT = MEBI(BIT);
-041 * Unit<Information> GIBYTE = GIBI(BYTE);}
-042 * </pre>
-043 * You could also apply <code>Unit.prefix</code>:
-044 * <pre>
-045 * {@code ...
-046 * Unit<Information> MEBIT = BIT.prefix(MEBI);
-047 * Unit<Information> GIBYTE = BYTE.prefix(GIBI);}
-048 * </pre>
-049 *
-050 * <p>
-051 * <b>Do not use ordinal() to obtain the numeric representation of BinaryPrefix. Use getValue() and getExponent() instead.</b>
-052 * </p>
-053 *
-054 * <dl>
-055 * <dt><span class="strong">Implementation Requirements</span></dt><dd>This is an immutable and thread-safe enum.</dd>
-056 * </dl>
-057 *
-058 * @author <a href="mailto:werner@units.tech">Werner Keil</a>
-059 * @version 2.2, May 20, 2023
-060 * @see <a href="https://en.wikipedia.org/wiki/Binary_prefix">Wikipedia: Binary Prefix</a>
-061 * @since 2.0
-062 */
-063public enum BinaryPrefix implements Prefix {
-064 /** Prefix for 1024. */
-065 KIBI("Ki", 1),
-066 /** Prefix for 1024<sup>2</sup>. */
-067 MEBI("Mi", 2),
-068 /** Prefix for 1024<sup>3</sup>. */
-069 GIBI("Gi", 3),
-070 /** Prefix for 1024<sup>4</sup>. */
-071 TEBI("Ti", 4),
-072 /** Prefix for 1024<sup>5</sup>. */
-073 PEBI("Pi", 5),
-074 /** Prefix for 1024<sup>6</sup>. */
-075 EXBI("Ei", 6),
-076 /** Prefix for 1024<sup>7</sup>. */
-077 ZEBI("Zi", 7),
-078 /** Prefix for 1024<sup>8</sup>. */
-079 YOBI("Yi", 8);
-080
-081 /**
-082 * The symbol of this prefix, as returned by {@link #getSymbol}.
-083 *
-084 * @serial
-085 * @see #getSymbol()
-086 */
-087 private final String symbol;
-088
-089 /**
-090 * Exponent part of the associated factor in base^exponent representation.
-091 */
-092 private final int exponent;
-093
-094 /**
-095 * Creates a new prefix.
-096 *
-097 * @param symbol
-098 * the symbol of this prefix.
-099 * @param exponent
-100 * part of the associated factor in base^exponent representation.
-101 */
-102 private BinaryPrefix(String symbol, int exponent) {
-103 this.symbol = symbol;
-104 this.exponent = exponent;
-105 }
-106
-107 /**
-108 * Returns the specified unit multiplied by the factor <code>1024</code> (binary prefix).
-109 *
-110 * @param <Q>
-111 * type of the quantity measured by the unit.
-112 * @param unit
-113 * any unit.
-114 * @return <code>unit.multiply(1024)</code>.
-115 */
-116 public static <Q extends Quantity<Q>> Unit<Q> KIBI(Unit<Q> unit) {
-117 return unit.prefix(KIBI);
-118 }
-119
-120 /**
-121 * Returns the specified unit multiplied by the factor <code>1024<sup>2</sup></code> (binary prefix).
-122 *
-123 * @param <Q>
-124 * type of the quantity measured by the unit.
-125 * @param unit
-126 * any unit.
-127 * @return <code>unit.multiply(1048576)</code>.
-128 */
-129 public static <Q extends Quantity<Q>> Unit<Q> MEBI(Unit<Q> unit) {
-130 return unit.prefix(MEBI);
-131 }
-132
-133 /**
-134 * Returns the specified unit multiplied by the factor <code>1024<sup>3</sup></code> (binary prefix).
-135 *
-136 * @param <Q>
-137 * type of the quantity measured by the unit.
-138 * @param unit
-139 * any unit.
-140 * @return <code>unit.multiply(1073741824)</code>.
-141 */
-142 public static <Q extends Quantity<Q>> Unit<Q> GIBI(Unit<Q> unit) {
-143 return unit.prefix(GIBI);
-144 }
-145
-146 /**
-147 * Returns the specified unit multiplied by the factor <code>1024<sup>4</sup></code> (binary prefix).
-148 *
-149 * @param <Q>
-150 * type of the quantity measured by the unit.
-151 * @param unit
-152 * any unit.
-153 * @return <code>unit.multiply(1099511627776L)</code>.
-154 */
-155 public static <Q extends Quantity<Q>> Unit<Q> TEBI(Unit<Q> unit) {
-156 return unit.prefix(TEBI);
-157 }
-158
-159 /**
-160 * Returns the specified unit multiplied by the factor <code>1024<sup>5</sup></code> (binary prefix).
-161 *
-162 * @param <Q>
-163 * type of the quantity measured by the unit.
-164 * @param unit
-165 * any unit.
-166 * @return <code>unit.multiply(1125899906842624L)</code>.
-167 */
-168 public static <Q extends Quantity<Q>> Unit<Q> PEBI(Unit<Q> unit) {
-169 return unit.prefix(PEBI);
-170 }
-171
-172 /**
-173 * Returns the specified unit multiplied by the factor <code>1024<sup>6</sup></code> (binary prefix).
-174 *
-175 * @param <Q>
-176 * type of the quantity measured by the unit.
-177 * @param unit
-178 * any unit.
-179 * @return <code>unit.multiply(1152921504606846976L)</code>.
-180 */
-181 public static <Q extends Quantity<Q>> Unit<Q> EXBI(Unit<Q> unit) {
-182 return unit.prefix(EXBI);
-183 }
-184
-185 /**
-186 * Returns the specified unit multiplied by the factor <code>1024<sup>7</sup></code> (binary prefix).
-187 *
-188 * @param <Q>
-189 * type of the quantity measured by the unit.
-190 * @param unit
-191 * any unit.
-192 * @return <code>unit.multiply(1152921504606846976d)</code>.
-193 */
-194 public static <Q extends Quantity<Q>> Unit<Q> ZEBI(Unit<Q> unit) {
-195 return unit.prefix(ZEBI);
-196 }
-197
-198 /**
-199 * Returns the specified unit multiplied by the factor <code>1024<sup>8</sup></code> (binary prefix).
-200 *
-201 * @param <Q>
-202 * type of the quantity measured by the unit.
-203 * @param unit
-204 * any unit.
-205 * @return <code>unit.multiply(1208925819614629174706176d)</code>.
-206 */
-207 public static <Q extends Quantity<Q>> Unit<Q> YOBI(Unit<Q> unit) {
-208 return unit.prefix(YOBI);
-209 }
-210
-211 /**
-212 * Returns the symbol of this prefix.
-213 *
-214 * @return this prefix symbol, not {@code null}.
-215 */
-216 @Override
-217 public String getSymbol() {
-218 return symbol;
-219 }
-220
-221 /**
-222 * Base part of the associated factor in {@code base^exponent} representation. For binary prefix, this is always 1024.
-223 */
-224 @Override
-225 public Integer getValue() {
-226 return 1024;
-227 }
-228
-229 /**
-230 * Exponent part of the associated factor in {@code base^exponent} representation.
-231 */
-232 @Override
-233 public int getExponent() {
-234 return exponent;
-235 }
-236
-237 /**
-238 * Returns the name of this prefix.
-239 *
-240 * @return this prefix name, not {@code null}.
-241 */
-242 @Override
-243 public String getName() {
-244 return name();
-245 }
-246}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure;
-031
-032import java.util.Map;
-033
-034/**
-035 * Represents the dimension of a unit.
-036 *
-037 * <p>
-038 * Concrete dimensions are obtained through the {@link Unit#getDimension()} method.
-039 * </p>
-040 *
-041 * <p>
-042 * Two units {@code u1} and {@code u2} are {@linkplain Unit#isCompatible(Unit) compatible} if and only if
-043 * {@code u1.getDimension().equals(u2.getDimension())}.
-044 * </p>
-045 *
-046 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-047 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-048 * @version 1.0, August 8, 2016
-049 * @since 1.0
-050 * @see Unit
-051 * @see <a href="http://en.wikipedia.org/wiki/Dimensional_analysis">Wikipedia: Dimensional Analysis</a>
-052 */
-053public interface Dimension {
-054 /**
-055 * Returns the product of this dimension with the one specified.
-056 *
-057 * @param multiplicand
-058 * the dimension multiplicand.
-059 * @return {@code this * multiplicand}
-060 */
-061 Dimension multiply(Dimension multiplicand);
-062
-063 /**
-064 * Returns the quotient of this dimension with the one specified.
-065 *
-066 * @param divisor
-067 * the dimension divisor.
-068 * @return {@code this / divisor}
-069 */
-070 Dimension divide(Dimension divisor);
-071
-072 /**
-073 * Returns this dimension raised to an exponent. <code>(this<sup>n</sup>)</code>
-074 *
-075 * @param n
-076 * power to raise this {@code Dimension} to.
-077 * @return <code>this<sup>n</sup></code>
-078 */
-079 Dimension pow(int n);
-080
-081 /**
-082 * Returns the given root of this dimension.
-083 *
-084 * @param n
-085 * the root's order.
-086 * @return the result of taking the given root of this dimension.
-087 * @throws ArithmeticException
-088 * if {@code n == 0}.
-089 */
-090 Dimension root(int n);
-091
-092 /**
-093 * Returns the (fundamental) base dimensions and their exponent whose product is this dimension, or {@code null} if this dimension is a base
-094 * dimension.
-095 *
-096 * @return the mapping between the fundamental dimensions and their exponent.
-097 */
-098 Map<? extends Dimension, Integer> getBaseDimensions();
-099}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure;
-031
-032/**
-033 * Signals that a problem of some sort has occurred due to incommensurable of some quantities/units. Only commensurable quantity (quantities with the
-034 * same dimensions) may be compared, equated, added, or subtracted. Also, one unit can be converted to another unit only if both units are
-035 * commensurable.
-036 * <p>
-037 * This is a <strong>checked</strong> exception, so it deliberately doesn't inherit from <code>MeasurementException</code> like most other exceptions.
-038 * </p>
-039 *
-040 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-041 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-042 * @version 1.0, August 8, 2016
-043 * @since 1.0
-044 *
-045 * @see <a href="http://en.wikipedia.org/wiki/Unit_commensurability#Commensurability">Wikipedia: Unit Commensurability</a>
-046 */
-047public class IncommensurableException extends Exception {
-048 /**
-049 * For cross-version compatibility.
-050 */
-051 private static final long serialVersionUID = -3676414292638136515L;
-052
-053 /**
-054 * Constructs a {@code IncommensurableException} with the given message.
-055 *
-056 * @param message
-057 * the detail message, or {@code null} if none.
-058 */
-059 public IncommensurableException(final String message) {
-060 super(message);
-061 }
-062
-063 /**
-064 * Constructs a {@code IncommensurableException} with the given cause.
-065 *
-066 * @param cause
-067 * the cause of this exception, or {@code null} if none.
-068 *
-069 */
-070 public IncommensurableException(final Throwable cause) {
-071 super(cause);
-072 }
-073
-074 /**
-075 * Constructs a {@code IncommensurableException} with the given message and cause.
-076 *
-077 * @param message
-078 * the detail message, or {@code null} if none.
-079 * @param cause
-080 * the cause of this exception, or {@code null} if none.
-081 *
-082 */
-083 public IncommensurableException(final String message, final Throwable cause) {
-084 super(message, cause);
-085 }
-086}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure;
-031
-032/**
-033 * This error is used to indicate serious problems with creating, retrieving and manipulating units of measurement objects.
-034 *
-035 * <dl>
-036 * <dt><span class="strong">Implementation Requirements:</span></dt>
-037 * <dd>This class is intended for use in a single thread. Exception thrown when errors occur during Units of Measurement operations.</dd>
-038 * </dl>
-039 *
-040 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-041 * @version 2.2, Feb 3, 2021
-042 * @since 2.1
-043 */
-044public class MeasurementError extends Error {
-045
-046 /**
-047 *
-048 */
-049 private static final long serialVersionUID = -412360965273525777L;
-050
-051 /**
-052 * Constructs a {@code MeasurementError} with no detail message.
-053 */
-054 public MeasurementError() {
-055 super();
-056 }
-057
-058 /**
-059 * Constructs a {@code MeasurementError} with the specified detail message.
-060 *
-061 * @param message
-062 * the detail message.
-063 */
-064 public MeasurementError(final String message) {
-065 super(message);
-066 }
-067
-068 /**
-069 * Constructs a {@code MeasurementError} with the given cause.
-070 *
-071 * @param cause
-072 * the cause of this exception, or {@code null} if none.
-073 */
-074 public MeasurementError(final Throwable cause) {
-075 super(cause);
-076 }
-077
-078 /**
-079 * Constructs a {@code MeasurementError} with the specified detail message and cause.
-080 *
-081 * @param message
-082 * the detail message.
-083 * @param cause
-084 * the cause, may be {@code null}
-085 */
-086 public MeasurementError(final String message, final Throwable cause) {
-087 super(message, cause);
-088 }
-089}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030//
-031// This source code implements specifications defined by the Java
-032// Community Process. In order to remain compliant with the specification
-033// DO NOT add / change / or delete method signatures!
-034//
-035package javax.measure;
-036
-037/**
-038 * Exception used to indicate a problem while dealing with units of measurement.
-039 * <p>
-040 * This exception is used to indicate problems with creating, retrieving and manipulating units of measurement objects.
-041 * </p>
-042 *
-043 * <dl>
-044 * <dt><span class="strong">Implementation Requirements:</span></dt>
-045 * <dd>This class is intended for use in a single thread. Exception thrown when errors occur during Units of Measurement operations.</dd>
-046 * </dl>
-047 *
-048 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-049 * @version 2.0, Jul 4, 2020
-050 * @since 1.0
-051 */
-052public class MeasurementException extends RuntimeException {
-053
-054 /**
-055 * For cross-version compatibility.
-056 */
-057 private static final long serialVersionUID = 8959937033300443361L;
-058
-059 /**
-060 * Constructs a {@code MeasurementException} with the given message.
-061 *
-062 * @param message
-063 * the detail message, or {@code null} if none.
-064 */
-065 public MeasurementException(final String message) {
-066 super(message);
-067 }
-068
-069 /**
-070 * Constructs a {@code MeasurementException} with the given cause.
-071 *
-072 * @param cause
-073 * the cause of this exception, or {@code null} if none.
-074 */
-075 public MeasurementException(final Throwable cause) {
-076 super(cause);
-077 }
-078
-079 /**
-080 * Constructs a {@code MeasurementException} with the given message and cause.
-081 *
-082 * @param message
-083 * the detail message, or {@code null} if none.
-084 * @param cause
-085 * the cause of this exception, or {@code null} if none.
-086 *
-087 */
-088 public MeasurementException(final String message, final Throwable cause) {
-089 super(message, cause);
-090 }
-091
-092 /**
-093 * Constructs a {@code MeasurementException} with no given message.
-094 *
-095 */
-096 protected MeasurementException() {
-097 super();
-098 }
-099}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure;
-031
-032/**
-033 * Provides support for the 24 prefixes used in the metric system (decimal multiples and submultiples of units). For example:
-034 *
-035 * <pre>
-036 * {@code import static tech.units.indriya.unit.Units.*; // Static import (from the RI).
-037 * import static javax.measure.MetricPrefix.*; // Static import.
-038 * import javax.measure.*;
-039 * import javax.measure.quantity.*;
-040 * ...
-041 * Unit<Pressure> HECTOPASCAL = HECTO(PASCAL);
-042 * Unit<Length> KILOMETRE = KILO(METRE);}
-043 * </pre>
-044 * You could also apply <code>Unit.prefix</code>:
-045 * <pre>
-046 * {@code ...
-047 * Unit<Pressure> HECTOPASCAL = PASCAL.prefix(HECTO);
-048 * Unit<Length> KILOMETRE = METRE.prefix(KILO);}
-049 * </pre>
-050 *
-051 * <p>
-052 * <b>Do not use ordinal() to obtain the numeric representation of MetricPrefix. Use getValue() and getExponent() instead.</b>
-053 * </p>
-054 *
-055 * <dl>
-056 * <dt><span class="strong">Implementation Requirements</span></dt><dd>This is an immutable and thread-safe enum.</dd>
-057 * </dl>
-058 *
-059 * @see <a href="https://en.wikipedia.org/wiki/Metric_prefix">Wikipedia: Metric Prefix</a>
-060 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-061 * @author <a href="mailto:werner@units.tech">Werner Keil</a>
-062 * @version 2.3, May 20, 2023
-063 * @since 2.0
-064 */
-065public enum MetricPrefix implements Prefix {
-066 /** Prefix for 10<sup>30</sup>. */
-067 QUETTA("Q", 30),
-068 /** Prefix for 10<sup>27</sup>. */
-069 RONNA("R", 27),
-070 /** Prefix for 10<sup>24</sup>. */
-071 YOTTA("Y", 24),
-072 /** Prefix for 10<sup>21</sup>. */
-073 ZETTA("Z", 21),
-074 /** Prefix for 10<sup>18</sup>. */
-075 EXA("E", 18),
-076 /** Prefix for 10<sup>15</sup>. */
-077 PETA("P", 15),
-078 /** Prefix for 10<sup>12</sup>. */
-079 TERA("T", 12),
-080 /** Prefix for 10<sup>9</sup>.
-081 * @see <a href="https://en.wikipedia.org/wiki/Giga-">Wikipedia: Giga</a>
-082 */
-083 GIGA("G", 9),
-084 /** Prefix for 10<sup>6</sup>.
-085 * @see <a href="https://en.wikipedia.org/wiki/Mega-">Wikipedia: Mega</a> */
-086 MEGA("M", 6),
-087 /** Prefix for 10<sup>3</sup>.
-088 * @see <a href="https://en.wikipedia.org/wiki/Kilo-">Wikipedia: Kilo</a>
-089 */
-090 KILO("k", 3),
-091 /** Prefix for 10<sup>2</sup>.
-092 * @see <a href="https://en.wikipedia.org/wiki/Hecto-">Wikipedia: Hecto</a> */
-093 HECTO("h", 2),
-094 /** Prefix for 10<sup>1</sup>.
-095 * @see <a href="https://en.wikipedia.org/wiki/Deca-">Wikipedia: Deca</a> */
-096 DECA("da", 1),
-097 /** Prefix for 10<sup>-1</sup>.
-098 * @see <a href="https://en.wikipedia.org/wiki/Deci-">Wikipedia: Deci</a> */
-099 DECI("d", -1),
-100 /** Prefix for 10<sup>-2</sup>.
-101 * @see <a href="https://en.wikipedia.org/wiki/Centi-">Wikipedia: Centi</a> */
-102 CENTI("c", -2),
-103 /** Prefix for 10<sup>-3</sup>.
-104 * @see <a href="https://en.wikipedia.org/wiki/Milli-">Wikipedia: Milli</a> */
-105 MILLI("m", -3),
-106 /** Prefix for 10<sup>-6</sup>.
-107 * @see <a href="https://en.wikipedia.org/wiki/Micro-">Wikipedia: Micro</a> */
-108 MICRO("\u00b5", -6),
-109 /** Prefix for 10<sup>-9</sup>.
-110 * @see <a href="https://en.wikipedia.org/wiki/Nano-">Wikipedia: Nano</a> */
-111 NANO("n", -9),
-112 /** Prefix for 10<sup>-12</sup>. */
-113 PICO("p", -12),
-114 /** Prefix for 10<sup>-15</sup>. */
-115 FEMTO("f", -15),
-116 /** Prefix for 10<sup>-18</sup>. */
-117 ATTO("a", -18),
-118 /** Prefix for 10<sup>-21</sup>. */
-119 ZEPTO("z", -21),
-120 /** Prefix for 10<sup>-24</sup>. */
-121 YOCTO("y", -24),
-122 /** Prefix for 10<sup>-27</sup>. */
-123 RONTO("r", -27),
-124 /** Prefix for 10<sup>-30</sup>. */
-125 QUECTO("q", -30);
-126
-127 /**
-128 * The symbol of this prefix, as returned by {@link #getSymbol}.
-129 *
-130 * @serial
-131 * @see #getSymbol()
-132 */
-133 private final String symbol;
-134
-135 /**
-136 * Exponent part of the associated factor in base^exponent representation.
-137 */
-138 private final int exponent;
-139
-140 /**
-141 * Creates a new prefix.
-142 *
-143 * @param symbol
-144 * the symbol of this prefix.
-145 * @param exponent
-146 * part of the associated factor in base^exponent representation.
-147 */
-148 private MetricPrefix(String symbol, int exponent) {
-149 this.symbol = symbol;
-150 this.exponent = exponent;
-151 }
-152
-153 /**
-154 * Returns the specified unit multiplied by the factor <code>10<sup>30</sup></code>
-155 *
-156 * @param <Q>
-157 * type of the quantity measured by the unit.
-158 * @param unit
-159 * any unit.
-160 * @return <code>unit.times(1e30)</code>.
-161 * @see #QUETTA
-162 */
-163 public static <Q extends Quantity<Q>> Unit<Q> QUETTA(Unit<Q> unit) {
-164 return unit.prefix(QUETTA);
-165 }
-166
-167 /**
-168 * Returns the specified unit multiplied by the factor <code>10<sup>27</sup></code>
-169 *
-170 * @param <Q>
-171 * type of the quantity measured by the unit.
-172 * @param unit
-173 * any unit.
-174 * @return <code>unit.times(1e27)</code>.
-175 * @see #RONNA
-176 */
-177 public static <Q extends Quantity<Q>> Unit<Q> RONNA(Unit<Q> unit) {
-178 return unit.prefix(RONNA);
-179 }
-180
-181 /**
-182 * Returns the specified unit multiplied by the factor <code>10<sup>24</sup></code>
-183 *
-184 * @param <Q>
-185 * type of the quantity measured by the unit.
-186 * @param unit
-187 * any unit.
-188 * @return <code>unit.times(1e24)</code>.
-189 * @see #YOTTA
-190 */
-191 public static <Q extends Quantity<Q>> Unit<Q> YOTTA(Unit<Q> unit) {
-192 return unit.prefix(YOTTA);
-193 }
-194
-195 /**
-196 * Returns the specified unit multiplied by the factor <code>10<sup>21</sup></code>
-197 *
-198 * @param <Q>
-199 * type of the quantity measured by the unit.
-200 * @param unit
-201 * any unit.
-202 * @return <code>unit.times(1e21)</code>.
-203 * @see #ZETTA
-204 */
-205 public static <Q extends Quantity<Q>> Unit<Q> ZETTA(Unit<Q> unit) {
-206 return unit.prefix(ZETTA);
-207 }
-208
-209 /**
-210 * Returns the specified unit multiplied by the factor <code>10<sup>18</sup></code>
-211 *
-212 * @param <Q>
-213 * type of the quantity measured by the unit.
-214 * @param unit
-215 * any unit.
-216 * @return <code>unit.times(1e18)</code>.
-217 * @see #EXA
-218 */
-219 public static <Q extends Quantity<Q>> Unit<Q> EXA(Unit<Q> unit) {
-220 return unit.prefix(EXA);
-221 }
-222
-223 /**
-224 * Returns the specified unit multiplied by the factor <code>10<sup>15</sup></code>
-225 *
-226 * @param <Q>
-227 * type of the quantity measured by the unit.
-228 * @param unit
-229 * any unit.
-230 * @return <code>unit.times(1e15)</code>.
-231 * @see #PETA
-232 */
-233 public static <Q extends Quantity<Q>> Unit<Q> PETA(Unit<Q> unit) {
-234 return unit.prefix(PETA);
-235 }
-236
-237 /**
-238 * Returns the specified unit multiplied by the factor <code>10<sup>12</sup></code>
-239 *
-240 * @param <Q>
-241 * type of the quantity measured by the unit.
-242 * @param unit
-243 * any unit.
-244 * @return <code>unit.times(1e12)</code>.
-245 * @see #TERA
-246 */
-247 public static <Q extends Quantity<Q>> Unit<Q> TERA(Unit<Q> unit) {
-248 return unit.prefix(TERA);
-249 }
-250
-251 /**
-252 * Returns the specified unit multiplied by the factor <code>10<sup>9</sup></code>
-253 *
-254 * @param <Q>
-255 * type of the quantity measured by the unit.
-256 * @param unit
-257 * any unit.
-258 * @return <code>unit.times(1e9)</code>.
-259 * @see #GIGA
-260 */
-261 public static <Q extends Quantity<Q>> Unit<Q> GIGA(Unit<Q> unit) {
-262 return unit.prefix(GIGA);
-263 }
-264
-265 /**
-266 * Returns the specified unit multiplied by the factor <code>10<sup>6</sup></code>
-267 *
-268 * @param <Q>
-269 * type of the quantity measured by the unit.
-270 * @param unit
-271 * any unit.
-272 * @return <code>unit.times(1e6)</code>.
-273 * @see #MEGA
-274 */
-275 public static <Q extends Quantity<Q>> Unit<Q> MEGA(Unit<Q> unit) {
-276 return unit.prefix(MEGA);
-277 }
-278
-279 /**
-280 * Returns the specified unit multiplied by the factor <code>10<sup>3</sup></code>
-281 *
-282 * @param <Q>
-283 * type of the quantity measured by the unit.
-284 * @param unit
-285 * any unit.
-286 * @return <code>unit.times(1e3)</code>.
-287 * @see #KILO
-288 */
-289 public static <Q extends Quantity<Q>> Unit<Q> KILO(Unit<Q> unit) {
-290 return unit.prefix(KILO);
-291 }
-292
-293 /**
-294 * Returns the specified unit multiplied by the factor <code>10<sup>2</sup></code>
-295 *
-296 * @param <Q>
-297 * type of the quantity measured by the unit.
-298 * @param unit
-299 * any unit.
-300 * @return <code>unit.times(1e2)</code>.
-301 * @see #HECTO
-302 */
-303 public static <Q extends Quantity<Q>> Unit<Q> HECTO(Unit<Q> unit) {
-304 return unit.prefix(HECTO);
-305 }
-306
-307 /**
-308 * Returns the specified unit multiplied by the factor <code>10<sup>1</sup></code>
-309 *
-310 * @param <Q>
-311 * type of the quantity measured by the unit.
-312 * @param unit
-313 * any unit.
-314 * @return <code>unit.times(1e1)</code>.
-315 * @see #DECA
-316 */
-317 public static <Q extends Quantity<Q>> Unit<Q> DECA(Unit<Q> unit) {
-318 return unit.prefix(DECA);
-319 }
-320
-321 /**
-322 * US alias for <code>DECA</code>.
-323 *
-324 * @param <Q>
-325 * type of the quantity measured by the unit.
-326 * @param unit
-327 * any unit.
-328 * @return <code>unit.times(1e1)</code>.
-329 * @see #DECA
-330 */
-331 public static <Q extends Quantity<Q>> Unit<Q> DEKA(Unit<Q> unit) {
-332 return unit.prefix(DECA);
-333 }
-334
-335 /**
-336 * Returns the specified unit multiplied by the factor <code>10<sup>-1</sup></code>
-337 *
-338 * @param <Q>
-339 * type of the quantity measured by the unit.
-340 * @param unit
-341 * any unit.
-342 * @return <code>unit.times(1e-1)</code>.
-343 * @see #DECI
-344 */
-345 public static <Q extends Quantity<Q>> Unit<Q> DECI(Unit<Q> unit) {
-346 return unit.prefix(DECI);
-347 }
-348
-349 /**
-350 * Returns the specified unit multiplied by the factor <code>10<sup>-2</sup></code>
-351 *
-352 * @param <Q>
-353 * type of the quantity measured by the unit.
-354 * @param unit
-355 * any unit.
-356 * @return <code>unit.times(1e-2)</code>.
-357 * @see #CENTI
-358 */
-359 public static <Q extends Quantity<Q>> Unit<Q> CENTI(Unit<Q> unit) {
-360 return unit.prefix(CENTI);
-361 }
-362
-363 /**
-364 * Returns the specified unit multiplied by the factor <code>10<sup>-3</sup></code>
-365 *
-366 * @param <Q>
-367 * type of the quantity measured by the unit.
-368 * @param unit
-369 * any unit.
-370 * @return <code>unit.times(1e-3)</code>.
-371 * @see #MILLI
-372 */
-373 public static <Q extends Quantity<Q>> Unit<Q> MILLI(Unit<Q> unit) {
-374 return unit.prefix(MILLI);
-375 }
-376
-377 /**
-378 * Returns the specified unit multiplied by the factor <code>10<sup>-6</sup></code>
-379 *
-380 * @param <Q>
-381 * type of the quantity measured by the unit.
-382 * @param unit
-383 * any unit.
-384 * @return <code>unit.times(1e-6)</code>.
-385 * @see #MICRO
-386 */
-387 public static <Q extends Quantity<Q>> Unit<Q> MICRO(Unit<Q> unit) {
-388 return unit.prefix(MICRO);
-389 }
-390
-391 /**
-392 * Returns the specified unit multiplied by the factor <code>10<sup>-9</sup></code>
-393 *
-394 * @param <Q>
-395 * type of the quantity measured by the unit.
-396 * @param unit
-397 * any unit.
-398 * @return <code>unit.times(1e-9)</code>.
-399 * @see #NANO
-400 */
-401 public static <Q extends Quantity<Q>> Unit<Q> NANO(Unit<Q> unit) {
-402 return unit.prefix(NANO);
-403 }
-404
-405 /**
-406 * Returns the specified unit multiplied by the factor <code>10<sup>-12</sup></code>
-407 *
-408 * @param <Q>
-409 * type of the quantity measured by the unit.
-410 * @param unit
-411 * any unit.
-412 * @return <code>unit.times(1e-12)</code>.
-413 * @see #PICO
-414 */
-415 public static <Q extends Quantity<Q>> Unit<Q> PICO(Unit<Q> unit) {
-416 return unit.prefix(PICO);
-417 }
-418
-419 /**
-420 * Returns the specified unit multiplied by the factor <code>10<sup>-15</sup></code>
-421 *
-422 * @param <Q>
-423 * type of the quantity measured by the unit.
-424 * @param unit
-425 * any unit.
-426 * @return <code>unit.times(1e-15)</code>.
-427 * @see #FEMTO
-428 */
-429 public static <Q extends Quantity<Q>> Unit<Q> FEMTO(Unit<Q> unit) {
-430 return unit.prefix(FEMTO);
-431 }
-432
-433 /**
-434 * Returns the specified unit multiplied by the factor <code>10<sup>-18</sup></code>
-435 *
-436 * @param <Q>
-437 * type of the quantity measured by the unit.
-438 * @param unit
-439 * any unit.
-440 * @return <code>unit.times(1e-18)</code>.
-441 * @see #ATTO
-442 */
-443 public static <Q extends Quantity<Q>> Unit<Q> ATTO(Unit<Q> unit) {
-444 return unit.prefix(ATTO);
-445 }
-446
-447 /**
-448 * Returns the specified unit multiplied by the factor <code>10<sup>-21</sup></code>
-449 *
-450 * @param <Q>
-451 * type of the quantity measured by the unit.
-452 * @param unit
-453 * any unit.
-454 * @return <code>unit.times(1e-21)</code>.
-455 * #see ZEPTO
-456 */
-457 public static <Q extends Quantity<Q>> Unit<Q> ZEPTO(Unit<Q> unit) {
-458 return unit.prefix(ZEPTO);
-459 }
-460
-461 /**
-462 * Returns the specified unit multiplied by the factor <code>10<sup>-24</sup></code>
-463 *
-464 * @param <Q>
-465 * type of the quantity measured by the unit.
-466 * @param unit
-467 * any unit.
-468 * @return <code>unit.times(1e-24)</code>.
-469 * @see #YOCTO
-470 */
-471 public static <Q extends Quantity<Q>> Unit<Q> YOCTO(Unit<Q> unit) {
-472 return unit.prefix(YOCTO);
-473 }
-474
-475 /**
-476 * Returns the specified unit multiplied by the factor <code>10<sup>-27</sup></code>
-477 *
-478 * @param <Q>
-479 * type of the quantity measured by the unit.
-480 * @param unit
-481 * any unit.
-482 * @return <code>unit.times(1e-27)</code>.
-483 * @see #RONTO
-484 */
-485 public static <Q extends Quantity<Q>> Unit<Q> RONTO(Unit<Q> unit) {
-486 return unit.prefix(RONTO);
-487 }
-488
-489 /**
-490 * Returns the specified unit multiplied by the factor <code>10<sup>-30</sup></code>
-491 *
-492 * @param <Q>
-493 * type of the quantity measured by the unit.
-494 * @param unit
-495 * any unit.
-496 * @return <code>unit.times(1e-30)</code>.
-497 * @see #QUECTO
-498 */
-499 public static <Q extends Quantity<Q>> Unit<Q> QUECTO(Unit<Q> unit) {
-500 return unit.prefix(QUECTO);
-501 }
-502
-503 /**
-504 * Returns the symbol of this prefix.
-505 *
-506 * @return this prefix symbol, not {@code null}.
-507 */
-508 @Override
-509 public String getSymbol() {
-510 return symbol;
-511 }
-512
-513 /**
-514 * Base part of the associated factor in {@code base^exponent} representation. For metric prefix, this is always 10.
-515 */
-516 @Override
-517 public Integer getValue() {
-518 return 10;
-519 }
-520
-521 /**
-522 * Exponent part of the associated factor in {@code base^exponent} representation.
-523 */
-524 @Override
-525 public int getExponent() {
-526 return exponent;
-527 }
-528
-529 /**
-530 * Returns the name of this prefix.
-531 *
-532 * @return this prefix name, not {@code null}.
-533 */
-534 @Override
-535 public String getName() {
-536 return name();
-537 }
-538}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure;
-031
-032/**
-033 * A unit prefix is a specifier or mnemonic that is prepended to units of measurement to indicate multiples or fractions of the units.
-034 *
-035 * @see <a href="https://en.wikipedia.org/wiki/Unit_prefix">Wikipedia: Unit Prefix</a>
-036 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-037 * @version 1.4, April 3, 2023
-038 * @since 2.0
-039 */
-040public interface Prefix {
-041 /**
-042 * Returns the name of this prefix.
-043 *
-044 * @return this prefix name, not {@code null}.
-045 */
-046 String getName();
-047
-048 /**
-049 * Returns the symbol of this prefix.
-050 *
-051 * @return this prefix symbol, not {@code null}.
-052 */
-053 public String getSymbol();
-054
-055 /**
-056 * Returns the value of this prefix. If the {@code exponent} is different from {@code 1}, this value is the {@code base} part of the associated
-057 * factor in {@code base^exponent} representation.
-058 *
-059 * @return The prefix value.
-060 */
-061 Number getValue();
-062
-063 /**
-064 * Exponent part of the associated factor in {@code base^exponent} representation. For different factors, e.g. rational numbers like {@code 1/4}
-065 * the exponent is always {@code 1}.
-066 *
-067 * @return the exponent part of this prefix.
-068 */
-069 int getExponent();
-070}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure;
-031
-032/**
-033 * Represents a quantitative property of a phenomenon, body, or substance, that
-034 * can be quantified by measurement. {@link javax.measure.quantity.Mass Mass},
-035 * time, distance, heat, and angular separation are among the familiar examples
-036 * of quantitative properties.
-037 * <p>
-038 * <code> {@literal Unit<Mass>} pound = ... {@literal Quantity<Length>} size = ... {@literal Sensor<Temperature>}<br>
-039 * thermometer = ... {@literal Vector3D<Speed>} aircraftSpeed = ... </code>
-040 * </p>
-041 *
-042 * <dl>
-043 * <dt><span class="strong">Arithmetic operations</span></dt>
-044 * </dl>
-045 * This interface defines some arithmetic operations between {@code Quantity}
-046 * instances. All implementations shall produce <em>equivalent</em> results for
-047 * the same operation applied on equivalent quantities. Two quantities are
-048 * equivalent if, after conversion to the same unit of measurement, they have
-049 * the same numerical value (ignoring rounding errors). For example 2000 metres
-050 * is equivalent to 2 km, but 2°C is not equivalent to 2 K; it is equivalent to
-051 * 275.15 K instead. Above requirement applied to addition means that 2°C + 2 K
-052 * shall be equivalent to 275.15 K + 2 K.
-053 *
-054 * <p>All operations shall preserve the
-055 * <a href="https://en.wikiversity.org/wiki/Basic_Laws_of_Algebra">basic laws
-056 * of algebra</a>, in particular <b>commutativity</b> of addition and
-057 * multiplication (<var>A</var> + <var>B</var> = <var>B</var> + <var>A</var>)
-058 * and <b>associativity</b> of addition and multiplication (<var>A</var> +
-059 * <var>B</var>) + <var>C</var> = <var>A</var> + (<var>B</var> + <var>C</var>).
-060 * In order to preserve those algebra laws, this specification requires all
-061 * arithmetic operations to execute <em>as is</em> all operands were converted
-062 * to {@linkplain Unit#getSystemUnit() system unit} before the operation is
-063 * carried out, and the result converted back to any compatible unit at
-064 * implementation choice. For example 4 cm + 1 inch shall produce any result
-065 * <em>equivalent</em> to 0.04 m + 0.0254 m.</p>
-066 *
-067 * <p>Implementations are allowed to avoid conversion to system unit if the
-068 * result is guaranteed to be equivalent. This is often the case when the
-069 * conversion between quantity unit and system unit is only a
-070 * {@linkplain UnitConverter#isLinear() scale factor}. However this is not
-071 * the case for conversions applying an offset or more complex formula.
-072 * For example 2°C + 1°C = 274.15°C, not 3°C. This counter-intuitive result
-073 * is essential for preserving algebra laws like associativity, and is also
-074 * the expected result from a thermodynamic point of view.</p>
-075 *
-076 * <dl>
-077 * <dt><span class="strong">API Note:</span></dt><dd>This interface places no restrictions on the mutability of
-078 * implementations, however immutability is strongly recommended. All
-079 * implementations must be {@link Comparable}.</dd>
-080 * </dl>
-081 *
-082 * @param <Q>
-083 * The type of the quantity.
-084 *
-085 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-086 * @author <a href="mailto:martin.desruisseaux@geomatys.com">Martin
-087 * Desruisseaux</a>
-088 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-089 * @author <a href="mailto:otaviopolianasantana@gmail.com">Otavio Santana</a>
-090 * @see Unit
-091 * @see <a href="http://en.wikipedia.org/wiki/Quantity">Wikipedia: Quantity</a>
-092 * @see <a href="http://martinfowler.com/eaaDev/quantity.html">Martin Fowler -
-093 * Quantity</a>
-094 * @version 2.5, May 20, 2023
-095 * @since 1.0
-096 */
-097public interface Quantity<Q extends Quantity<Q>> {
-098
-099 /**
-100 * The scale of a {@link Quantity}, either {@code ABSOLUTE} or {@code RELATIVE}.
-101 *
-102 * @since 2.0
-103 * @see <a href="https://en.wikipedia.org/wiki/Absolute_scale">Wikipedia: Absolute scale</a>
-104 */
-105 public static enum Scale {
-106 /**
-107 * Absolute scale
-108 * @see <a href="https://en.wikipedia.org/wiki/Absolute_scale">Wikipedia: Absolute scale</a>
-109 */
-110 ABSOLUTE,
-111 /**
-112 * Relative scale
-113 */
-114 RELATIVE
-115 }
-116
-117 /**
-118 * Returns the sum of this {@code Quantity} with the one specified.
-119 * The result shall be as if this quantity and the given addend were
-120 * converted to {@linkplain Unit#getSystemUnit() system unit} before
-121 * to be added, and the result converted back to the unit of this
-122 * quantity or any other compatible unit at implementation choice.
-123 *
-124 * @param addend
-125 * the {@code Quantity} to be added.
-126 * @return {@code this + addend}.
-127 */
-128 Quantity<Q> add(Quantity<Q> addend);
-129
-130 /**
-131 * Returns the difference between this {@code Quantity} and the one specified.
-132 * The result shall be as if this quantity and the given subtrahend were
-133 * converted to {@linkplain Unit#getSystemUnit() system unit} before
-134 * to be subtracted, and the result converted back to the unit of this
-135 * quantity or any other compatible unit at implementation choice.
-136 *
-137 * @param subtrahend
-138 * the {@code Quantity} to be subtracted.
-139 * @return <code>this - subtrahend</code>.
-140 */
-141 Quantity<Q> subtract(Quantity<Q> subtrahend);
-142
-143 /**
-144 * Returns the quotient of this {@code Quantity} divided by the {@code Quantity}
-145 * specified.
-146 * The result shall be as if this quantity and the given divisor were
-147 * converted to {@linkplain Unit#getSystemUnit() system unit} before
-148 * to be divided, and the result converted back to the unit of this
-149 * quantity or any other compatible unit at implementation choice.
-150 *
-151 * @throws ClassCastException
-152 * if the type of an element in the specified operation is
-153 * incompatible with this quantity
-154 *
-155 * @param divisor
-156 * the {@code Quantity} divisor.
-157 * @return <code>this / divisor</code>.
-158 */
-159 Quantity<?> divide(Quantity<?> divisor);
-160
-161 /**
-162 * Returns the quotient of this {@code Quantity} divided by the {@code Number}
-163 * specified.
-164 * The result shall be as if this quantity was converted to
-165 * {@linkplain Unit#getSystemUnit() system unit} before to be divided,
-166 * and the result converted back to the unit of this quantity or any
-167 * other compatible unit at implementation choice.
-168 *
-169 * @param divisor
-170 * the {@code Number} divisor.
-171 * @return <code>this / divisor</code>.
-172 */
-173 Quantity<Q> divide(Number divisor);
-174
-175 /**
-176 * Returns the product of this {@code Quantity} with the one specified.
-177 * The result shall be as if this quantity and the given multiplicand were
-178 * converted to {@linkplain Unit#getSystemUnit() system unit} before
-179 * to be multiplied, and the result converted back to the unit of this
-180 * quantity or any other compatible unit at implementation choice.
-181 *
-182 * @throws ClassCastException
-183 * if the type of an element in the specified operation is
-184 * incompatible with this quantity
-185 *
-186 * @param multiplicand
-187 * the {@code Quantity} multiplicand.
-188 * @return <code>this * multiplicand</code>.
-189 */
-190 Quantity<?> multiply(Quantity<?> multiplicand);
-191
-192 /**
-193 * Returns the product of this {@code Quantity} with the {@code Number} value
-194 * specified.
-195 * The result shall be as if this quantity was converted to
-196 * {@linkplain Unit#getSystemUnit() system unit} before to be multiplied,
-197 * and the result converted back to the unit of this quantity or any
-198 * other compatible unit at implementation choice.
-199 *
-200 * @param multiplicand
-201 * the {@code Number} multiplicand.
-202 * @return <code>this * multiplicand</code>.
-203 */
-204 Quantity<Q> multiply(Number multiplicand);
-205
-206 /**
-207 * Returns this {@code Quantity} converted into another (compatible)
-208 * {@code Unit}.
-209 *
-210 * @param unit
-211 * the {@code Unit unit} in which the returned quantity is stated.
-212 * @return this quantity or a new quantity equivalent to this quantity stated in the specified unit.
-213 * @throws ArithmeticException
-214 * if the result is inexact and the quotient has a non-terminating decimal expansion.
-215 */
-216 Quantity<Q> to(Unit<Q> unit);
-217
-218 /**
-219 * Returns a {@code Quantity} that is the multiplicative inverse of this
-220 * {@code Quantity}, having reciprocal value and reciprocal unit as given by
-221 * {@code this.getUnit().inverse()}.
-222 *
-223 * @return reciprocal {@code Quantity}
-224 * @see <a href=
-225 * "https://en.wikipedia.org/wiki/Multiplicative_inverse">Wikipedia:
-226 * Multiplicative inverse</a>
-227 */
-228 Quantity<?> inverse();
-229
-230 /**
-231 * Returns a {@code Quantity} whose value is {@code (-this.getValue())}.
-232 *
-233 * @return {@code -this}.
-234 */
-235 Quantity<Q> negate();
-236
-237 /**
-238 * Casts this quantity to a parameterized unit of specified nature or throw a
-239 * <code>ClassCastException</code> if the dimension of the specified quantity
-240 * and this measure unit's dimension do not match. For example:
-241 * <p>
-242 * <code>
-243 * {@literal Quantity<Length>} length = Quantities.getQuantity("2 km").asType(Length.class);
-244 * </code> or <code>
-245 * {@literal Quantity<Speed>} C = length.multiply(299792458).divide(second).asType(Speed.class);
-246 * </code>
-247 * </p>
-248 *
-249 * @param <T>
-250 * The type of the quantity.
-251 * @param type
-252 * the quantity class identifying the nature of the quantity.
-253 * @return this quantity parameterized with the specified type.
-254 * @throws ClassCastException
-255 * if the dimension of this unit is different from the specified
-256 * quantity dimension.
-257 * @throws UnsupportedOperationException
-258 * if the specified quantity class does not have a SI unit for the
-259 * quantity.
-260 * @see Unit#asType(Class)
-261 */
-262 <T extends Quantity<T>> Quantity<T> asType(Class<T> type) throws ClassCastException;
-263
-264 /**
-265 * Returns the value of this {@code Quantity}.
-266 *
-267 * @return a value.
-268 */
-269 Number getValue();
-270
-271 /**
-272 * Returns the unit of this {@code Quantity}.
-273 *
-274 * @return the unit (shall not be {@code null}).
-275 */
-276 Unit<Q> getUnit();
-277
-278 /**
-279 * Convenient method equivalent to {@link #to(javax.measure.Unit)
-280 * to(getUnit().toSystemUnit())}.
-281 *
-282 * @return this quantity or a new quantity equivalent to this quantity stated in
-283 * SI units.
-284 * @throws ArithmeticException
-285 * if the result is inexact and the quotient has a non-terminating
-286 * decimal expansion.
-287 */
-288 default Quantity<Q> toSystemUnit() {
-289 return to(getUnit().getSystemUnit());
-290 }
-291
-292 /**
-293 * Returns the {@code Scale} of this {@code Quantity}, if it's absolute or relative.
-294 *
-295 * @return the scale, if it's an absolute or relative quantity.
-296 * @since 2.0
-297
-298 * @see <a href="https://en.wikipedia.org/wiki/Absolute_scale">Wikipedia: Absolute scale</a>
-299 */
-300 Scale getScale();
-301
-302 /**
-303 * Compares two instances of {@code Quantity <Q>}, performing the conversion of units if necessary.
-304 *
-305 * @param that
-306 * the {@code quantity<Q>} to be compared with this instance.
-307 * @return {@code true} if {@code that \u2261 this}.
-308 * @throws NullPointerException
-309 * if the quantity is null
-310 *
-311 * @see <a href= "https://dictionary.cambridge.org/dictionary/english/equivalent">Cambridge Dictionary: equivalent</a>
-312 * @see <a href= "https://www.lexico.com/en/definition/equivalent">LEXICO: equivalent</a>
-313 * @since 2.1
-314 */
-315 boolean isEquivalentTo(Quantity<Q> that);
-316}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure;
-031
-032/**
-033 * Represents a quantitative property of a phenomenon, body, or substance, that
-034 * can be quantified by measurement. {@link javax.measure.quantity.Mass Mass},
-035 * time, distance, heat, and angular separation are among the familiar examples
-036 * of quantitative properties.
-037 * <p>
-038 * <code> {@literal Unit<Mass>} pound = ... {@literal Quantity<Length>} size = ... {@literal Sensor<Temperature>}<br>
-039 * thermometer = ... {@literal Vector3D<Speed>} aircraftSpeed = ... </code>
-040 * </p>
-041 *
-042 * <dl>
-043 * <dt><span class="strong">Arithmetic operations</span></dt>
-044 * </dl>
-045 * This interface defines some arithmetic operations between {@code Quantity}
-046 * instances. All implementations shall produce <em>equivalent</em> results for
-047 * the same operation applied on equivalent quantities. Two quantities are
-048 * equivalent if, after conversion to the same unit of measurement, they have
-049 * the same numerical value (ignoring rounding errors). For example 2000 metres
-050 * is equivalent to 2 km, but 2°C is not equivalent to 2 K; it is equivalent to
-051 * 275.15 K instead. Above requirement applied to addition means that 2°C + 2 K
-052 * shall be equivalent to 275.15 K + 2 K.
-053 *
-054 * <p>All operations shall preserve the
-055 * <a href="https://en.wikiversity.org/wiki/Basic_Laws_of_Algebra">basic laws
-056 * of algebra</a>, in particular <b>commutativity</b> of addition and
-057 * multiplication (<var>A</var> + <var>B</var> = <var>B</var> + <var>A</var>)
-058 * and <b>associativity</b> of addition and multiplication (<var>A</var> +
-059 * <var>B</var>) + <var>C</var> = <var>A</var> + (<var>B</var> + <var>C</var>).
-060 * In order to preserve those algebra laws, this specification requires all
-061 * arithmetic operations to execute <em>as is</em> all operands were converted
-062 * to {@linkplain Unit#getSystemUnit() system unit} before the operation is
-063 * carried out, and the result converted back to any compatible unit at
-064 * implementation choice. For example 4 cm + 1 inch shall produce any result
-065 * <em>equivalent</em> to 0.04 m + 0.0254 m.</p>
-066 *
-067 * <p>Implementations are allowed to avoid conversion to system unit if the
-068 * result is guaranteed to be equivalent. This is often the case when the
-069 * conversion between quantity unit and system unit is only a
-070 * {@linkplain UnitConverter#isLinear() scale factor}. However this is not
-071 * the case for conversions applying an offset or more complex formula.
-072 * For example 2°C + 1°C = 274.15°C, not 3°C. This counter-intuitive result
-073 * is essential for preserving algebra laws like associativity, and is also
-074 * the expected result from a thermodynamic point of view.</p>
-075 *
-076 * <dl>
-077 * <dt><span class="strong">API Note:</span></dt><dd>This interface places no restrictions on the mutability of
-078 * implementations, however immutability is strongly recommended. All
-079 * implementations must be {@link Comparable}.</dd>
-080 * </dl>
-081 *
-082 * @param <Q>
-083 * The type of the quantity.
-084 *
-085 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-086 * @author <a href="mailto:martin.desruisseaux@geomatys.com">Martin
-087 * Desruisseaux</a>
-088 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-089 * @author <a href="mailto:otaviopolianasantana@gmail.com">Otavio Santana</a>
-090 * @see Unit
-091 * @see <a href="http://en.wikipedia.org/wiki/Quantity">Wikipedia: Quantity</a>
-092 * @see <a href="http://martinfowler.com/eaaDev/quantity.html">Martin Fowler -
-093 * Quantity</a>
-094 * @version 2.5, May 20, 2023
-095 * @since 1.0
-096 */
-097public interface Quantity<Q extends Quantity<Q>> {
-098
-099 /**
-100 * The scale of a {@link Quantity}, either {@code ABSOLUTE} or {@code RELATIVE}.
-101 *
-102 * @since 2.0
-103 * @see <a href="https://en.wikipedia.org/wiki/Absolute_scale">Wikipedia: Absolute scale</a>
-104 */
-105 public static enum Scale {
-106 /**
-107 * Absolute scale
-108 * @see <a href="https://en.wikipedia.org/wiki/Absolute_scale">Wikipedia: Absolute scale</a>
-109 */
-110 ABSOLUTE,
-111 /**
-112 * Relative scale
-113 */
-114 RELATIVE
-115 }
-116
-117 /**
-118 * Returns the sum of this {@code Quantity} with the one specified.
-119 * The result shall be as if this quantity and the given addend were
-120 * converted to {@linkplain Unit#getSystemUnit() system unit} before
-121 * to be added, and the result converted back to the unit of this
-122 * quantity or any other compatible unit at implementation choice.
-123 *
-124 * @param addend
-125 * the {@code Quantity} to be added.
-126 * @return {@code this + addend}.
-127 */
-128 Quantity<Q> add(Quantity<Q> addend);
-129
-130 /**
-131 * Returns the difference between this {@code Quantity} and the one specified.
-132 * The result shall be as if this quantity and the given subtrahend were
-133 * converted to {@linkplain Unit#getSystemUnit() system unit} before
-134 * to be subtracted, and the result converted back to the unit of this
-135 * quantity or any other compatible unit at implementation choice.
-136 *
-137 * @param subtrahend
-138 * the {@code Quantity} to be subtracted.
-139 * @return <code>this - subtrahend</code>.
-140 */
-141 Quantity<Q> subtract(Quantity<Q> subtrahend);
-142
-143 /**
-144 * Returns the quotient of this {@code Quantity} divided by the {@code Quantity}
-145 * specified.
-146 * The result shall be as if this quantity and the given divisor were
-147 * converted to {@linkplain Unit#getSystemUnit() system unit} before
-148 * to be divided, and the result converted back to the unit of this
-149 * quantity or any other compatible unit at implementation choice.
-150 *
-151 * @throws ClassCastException
-152 * if the type of an element in the specified operation is
-153 * incompatible with this quantity
-154 *
-155 * @param divisor
-156 * the {@code Quantity} divisor.
-157 * @return <code>this / divisor</code>.
-158 */
-159 Quantity<?> divide(Quantity<?> divisor);
-160
-161 /**
-162 * Returns the quotient of this {@code Quantity} divided by the {@code Number}
-163 * specified.
-164 * The result shall be as if this quantity was converted to
-165 * {@linkplain Unit#getSystemUnit() system unit} before to be divided,
-166 * and the result converted back to the unit of this quantity or any
-167 * other compatible unit at implementation choice.
-168 *
-169 * @param divisor
-170 * the {@code Number} divisor.
-171 * @return <code>this / divisor</code>.
-172 */
-173 Quantity<Q> divide(Number divisor);
-174
-175 /**
-176 * Returns the product of this {@code Quantity} with the one specified.
-177 * The result shall be as if this quantity and the given multiplicand were
-178 * converted to {@linkplain Unit#getSystemUnit() system unit} before
-179 * to be multiplied, and the result converted back to the unit of this
-180 * quantity or any other compatible unit at implementation choice.
-181 *
-182 * @throws ClassCastException
-183 * if the type of an element in the specified operation is
-184 * incompatible with this quantity
-185 *
-186 * @param multiplicand
-187 * the {@code Quantity} multiplicand.
-188 * @return <code>this * multiplicand</code>.
-189 */
-190 Quantity<?> multiply(Quantity<?> multiplicand);
-191
-192 /**
-193 * Returns the product of this {@code Quantity} with the {@code Number} value
-194 * specified.
-195 * The result shall be as if this quantity was converted to
-196 * {@linkplain Unit#getSystemUnit() system unit} before to be multiplied,
-197 * and the result converted back to the unit of this quantity or any
-198 * other compatible unit at implementation choice.
-199 *
-200 * @param multiplicand
-201 * the {@code Number} multiplicand.
-202 * @return <code>this * multiplicand</code>.
-203 */
-204 Quantity<Q> multiply(Number multiplicand);
-205
-206 /**
-207 * Returns this {@code Quantity} converted into another (compatible)
-208 * {@code Unit}.
-209 *
-210 * @param unit
-211 * the {@code Unit unit} in which the returned quantity is stated.
-212 * @return this quantity or a new quantity equivalent to this quantity stated in the specified unit.
-213 * @throws ArithmeticException
-214 * if the result is inexact and the quotient has a non-terminating decimal expansion.
-215 */
-216 Quantity<Q> to(Unit<Q> unit);
-217
-218 /**
-219 * Returns a {@code Quantity} that is the multiplicative inverse of this
-220 * {@code Quantity}, having reciprocal value and reciprocal unit as given by
-221 * {@code this.getUnit().inverse()}.
-222 *
-223 * @return reciprocal {@code Quantity}
-224 * @see <a href=
-225 * "https://en.wikipedia.org/wiki/Multiplicative_inverse">Wikipedia:
-226 * Multiplicative inverse</a>
-227 */
-228 Quantity<?> inverse();
-229
-230 /**
-231 * Returns a {@code Quantity} whose value is {@code (-this.getValue())}.
-232 *
-233 * @return {@code -this}.
-234 */
-235 Quantity<Q> negate();
-236
-237 /**
-238 * Casts this quantity to a parameterized unit of specified nature or throw a
-239 * <code>ClassCastException</code> if the dimension of the specified quantity
-240 * and this measure unit's dimension do not match. For example:
-241 * <p>
-242 * <code>
-243 * {@literal Quantity<Length>} length = Quantities.getQuantity("2 km").asType(Length.class);
-244 * </code> or <code>
-245 * {@literal Quantity<Speed>} C = length.multiply(299792458).divide(second).asType(Speed.class);
-246 * </code>
-247 * </p>
-248 *
-249 * @param <T>
-250 * The type of the quantity.
-251 * @param type
-252 * the quantity class identifying the nature of the quantity.
-253 * @return this quantity parameterized with the specified type.
-254 * @throws ClassCastException
-255 * if the dimension of this unit is different from the specified
-256 * quantity dimension.
-257 * @throws UnsupportedOperationException
-258 * if the specified quantity class does not have a SI unit for the
-259 * quantity.
-260 * @see Unit#asType(Class)
-261 */
-262 <T extends Quantity<T>> Quantity<T> asType(Class<T> type) throws ClassCastException;
-263
-264 /**
-265 * Returns the value of this {@code Quantity}.
-266 *
-267 * @return a value.
-268 */
-269 Number getValue();
-270
-271 /**
-272 * Returns the unit of this {@code Quantity}.
-273 *
-274 * @return the unit (shall not be {@code null}).
-275 */
-276 Unit<Q> getUnit();
-277
-278 /**
-279 * Convenient method equivalent to {@link #to(javax.measure.Unit)
-280 * to(getUnit().toSystemUnit())}.
-281 *
-282 * @return this quantity or a new quantity equivalent to this quantity stated in
-283 * SI units.
-284 * @throws ArithmeticException
-285 * if the result is inexact and the quotient has a non-terminating
-286 * decimal expansion.
-287 */
-288 default Quantity<Q> toSystemUnit() {
-289 return to(getUnit().getSystemUnit());
-290 }
-291
-292 /**
-293 * Returns the {@code Scale} of this {@code Quantity}, if it's absolute or relative.
-294 *
-295 * @return the scale, if it's an absolute or relative quantity.
-296 * @since 2.0
-297
-298 * @see <a href="https://en.wikipedia.org/wiki/Absolute_scale">Wikipedia: Absolute scale</a>
-299 */
-300 Scale getScale();
-301
-302 /**
-303 * Compares two instances of {@code Quantity <Q>}, performing the conversion of units if necessary.
-304 *
-305 * @param that
-306 * the {@code quantity<Q>} to be compared with this instance.
-307 * @return {@code true} if {@code that \u2261 this}.
-308 * @throws NullPointerException
-309 * if the quantity is null
-310 *
-311 * @see <a href= "https://dictionary.cambridge.org/dictionary/english/equivalent">Cambridge Dictionary: equivalent</a>
-312 * @see <a href= "https://www.lexico.com/en/definition/equivalent">LEXICO: equivalent</a>
-313 * @since 2.1
-314 */
-315 boolean isEquivalentTo(Quantity<Q> that);
-316}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure;
-031
-032/**
-033 * Signals that a problem of some sort has occurred due to the impossibility of constructing a converter between two units. For example, the
-034 * multiplication of offset units are usually units not convertible to their {@linkplain Unit#getSystemUnit() system unit}.
-035 *
-036 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-037 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-038 * @version 1.0, Aug 8, 2016
-039 *
-040 */
-041public class UnconvertibleException extends MeasurementException {
-042 /**
-043 * For cross-version compatibility.
-044 */
-045 private static final long serialVersionUID = -4623551240019830166L;
-046
-047 /**
-048 * Constructs a {@code UnconvertibleException} with the given message.
-049 *
-050 * @param message
-051 * the detail message, or {@code null} if none.
-052 */
-053 public UnconvertibleException(final String message) {
-054 super(message);
-055 }
-056
-057 /**
-058 * Constructs a {@code UnconvertibleException} with the given cause.
-059 *
-060 * @param cause
-061 * the cause of this exception, or {@code null} if none.
-062 */
-063 public UnconvertibleException(final Throwable cause) {
-064 super(cause);
-065 }
-066
-067 /**
-068 * Constructs a {@code UnconvertibleException} with the given message and cause.
-069 *
-070 * @param message
-071 * the detail message, or {@code null} if none.
-072 * @param cause
-073 * the cause of this exception, or {@code null} if none.
-074 *
-075 */
-076 public UnconvertibleException(final String message, final Throwable cause) {
-077 super(message, cause);
-078 }
-079}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030//
-031// This source code implements specifications defined by the Java
-032// Community Process. In order to remain compliant with the specification
-033// DO NOT add / change / or delete method signatures!
-034//
-035package javax.measure;
-036
-037import java.util.Map;
-038
-039/**
-040 * Represents a determinate {@linkplain Quantity quantity} (as of length, time, heat, or value) adopted as a standard of measurement.
-041 *
-042 * <p>
-043 * It is helpful to think of instances of this class as recording the history by which they are created. Thus, for example, the string {@code "g/kg"}
-044 * (which is a dimensionless unit) would result from invoking the method {@link #toString()} on a unit that was created by dividing a gram unit by a
-045 * kilogram unit.
-046 * </p>
-047 *
-048 * <p>
-049 * This interface supports the multiplication of offsets units. The result is usually a unit not convertible to its {@linkplain #getSystemUnit()
-050 * system unit}. Such units may appear in derivative quantities. For example Celsius per meter is an unit of gradient, which is common in atmospheric
-051 * and oceanographic research.
-052 * </p>
-053 *
-054 * <p>
-055 * Units raised at non-integral powers are not supported. For example, {@code LITRE.root(2)} raises an {@code ArithmeticException}, but
-056 * {@code HECTARE.root(2)} returns {@code HECTOMETRE} (100 metres).
-057 * </p>
-058 *
-059 * <p>
-060 * Unit instances shall be immutable.
-061 * </p>
-062 *
-063 * @param <Q>
-064 * The type of the quantity measured by this unit.
-065 *
-066 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-067 * @author <a href="mailto:steve@unidata.ucar.edu">Steve Emmerson</a>
-068 * @author <a href="mailto:martin.desruisseaux@geomatys.com">Martin Desruisseaux</a>
-069 * @author <a href="mailto:werner@units.tech">Werner Keil</a>
-070 * @version 2.4, November 11, 2020
-071 * @since 1.0
-072 *
-073 * @see <a href="http://en.wikipedia.org/wiki/Units_of_measurement">Wikipedia: Units of measurement</a>
-074 */
-075public interface Unit<Q extends Quantity<Q>> {
-076
-077 /*******************/
-078 /** Units Queries **/
-079 /*******************/
-080
-081 /**
-082 * Returns the symbol (if any) of this unit. This method returns {@code null} if this unit has no specific symbol associated with.
-083 *
-084 * @return this unit symbol, or {@code null} if this unit has not specific symbol associated with (e.g. product of units).
-085 *
-086 * @see #toString()
-087 * @see javax.measure.format.UnitFormat
-088 */
-089 String getSymbol();
-090
-091 /**
-092 * Returns the name (if any) of this unit. This method returns {@code null} if this unit has no specific name associated with.
-093 *
-094 * @return this unit name, or {@code null} if this unit has not specific name associated with (e.g. product of units).
-095 *
-096 * @see #toString()
-097 * @see javax.measure.format.UnitFormat
-098 */
-099 String getName();
-100
-101 /**
-102 * Returns the dimension of this unit. Two units {@code u1} and {@code u2} are {@linkplain #isCompatible(Unit) compatible} if and only if
-103 * {@code u1.getDimension().equals(u2.getDimension())}.
-104 *
-105 * @return the dimension of this unit.
-106 *
-107 * @see #isCompatible(Unit)
-108 */
-109 Dimension getDimension();
-110
-111 /**
-112 * Returns the unscaled system unit from which this unit is derived. System units are either base units, {@linkplain #alternate(String) alternate}
-113 * units or product of rational powers of system units.
-114 *
-115 * <p>
-116 * Because the system unit is unique by quantity type, it can be be used to identify the quantity given the unit. For example:
-117 * </p>
-118 * <code>
-119 * static boolean isAngularSpeed(Unit<?> unit) {<br>
-120 * return unit.getSystemUnit().equals(RADIAN.divide(SECOND));<br>
-121 * }<br>
-122 * assert isAngularSpeed(REVOLUTION.divide(MINUTE)); // Returns true.<br><br>
-123 * </code>
-124 *
-125 * @return the system unit this unit is derived from, or {@code this} if this unit is a system unit.
-126 */
-127 Unit<Q> getSystemUnit();
-128
-129 /**
-130 * Returns the base units and their exponent whose product is this unit, or {@code null} if this unit is a base unit (not a product of existing
-131 * units).
-132 *
-133 * @return the base units and their exponent making up this unit.
-134 */
-135 Map<? extends Unit<?>, Integer> getBaseUnits();
-136
-137 /**
-138 * Indicates if this unit is compatible with the unit specified. Units don't need to be equal to be compatible. For example (assuming {@code ONE}
-139 * is a dimensionless unit):<br>
-140 *
-141 * <code>
-142 * RADIAN.equals(ONE) == false<br>
-143 * RADIAN.isCompatible(ONE) == true<br>
-144 * RADIAN.isEquivalentTo(ONE) <b>doesn't compile</b><br>
-145 * </code>
-146 *
-147 * @param that
-148 * the other unit to compare for compatibility.
-149 * @return {@code this.getDimension().equals(that.getDimension())}
-150 *
-151 * @see #getDimension()
-152 */
-153 boolean isCompatible(Unit<?> that);
-154
-155 /**
-156 * Indicates if this unit represents the same quantity than the given unit, ignoring name and symbols.
-157 * Two units are equivalent if the {@linkplain #getConverterTo(Unit) conversion} between them is identity.
-158 *
-159 * <p>
-160 * Unlike {@link #isCompatible(Unit)} an equivalence check requires both units to be strictly type-compatible,
-161 * because it makes no sense to compare e.g. {@code gram} and {@code mm} for equivalence.
-162 * By contrast, the compatibility check can works across different quantity types.
-163 * </p>
-164 *
-165 * @param that the {@code Unit<Q>} to be compared with this instance.
-166 * @return {@code true} if {@code that \u2261 this}.
-167 * @throws NullPointerException if the unit is null
-168 *
-169 * @see <a href= "https://dictionary.cambridge.org/dictionary/english/equivalent">Cambridge Dictionary: equivalent</a>
-170 * @see <a href= "https://www.lexico.com/en/definition/equivalent">LEXICO: equivalent</a>
-171 * @since 2.1
-172 */
-173 boolean isEquivalentTo(Unit<Q> that);
-174
-175 /**
-176 * Casts this unit to a parameterized unit of specified nature or throw a {@code ClassCastException} if the dimension of the specified quantity and
-177 * this unit's dimension do not match. For example:<br>
-178 *
-179 * <code>
-180 * {@literal Unit<Speed>} C = METRE.multiply(299792458).divide(SECOND).asType(Speed.class);
-181 * </code>
-182 *
-183 * @param <T>
-184 * The type of the quantity measured by the unit.
-185 * @param type
-186 * the quantity class identifying the nature of the unit.
-187 * @return this unit parameterized with the specified type.
-188 * @throws ClassCastException
-189 * if the dimension of this unit is different from the specified quantity dimension.
-190 */
-191 <T extends Quantity<T>> Unit<T> asType(Class<T> type) throws ClassCastException;
-192
-193 /**
-194 * Returns a converter of numeric values from this unit to another unit of same type. This method performs the same work as
-195 * {@link #getConverterToAny(Unit)} without raising checked exception.
-196 *
-197 * @param that
-198 * the unit of same type to which to convert the numeric values.
-199 * @return the converter from this unit to {@code that} unit.
-200 * @throws UnconvertibleException
-201 * if a converter cannot be constructed.
-202 *
-203 * @see #getConverterToAny(Unit)
-204 */
-205 UnitConverter getConverterTo(Unit<Q> that) throws UnconvertibleException;
-206
-207 /**
-208 * Returns a converter from this unit to the specified unit of type unknown. This method can be used when the quantity type of the specified unit is
-209 * unknown at compile-time or when dimensional analysis allows for conversion between units of different type.
-210 *
-211 * <p>
-212 * To convert to a unit having the same parameterized type, {@link #getConverterTo(Unit)} is preferred (no checked exception raised).
-213 * </p>
-214 *
-215 * @param that
-216 * the unit to which to convert the numeric values.
-217 * @return the converter from this unit to {@code that} unit.
-218 * @throws IncommensurableException
-219 * if this unit is not {@linkplain #isCompatible(Unit) compatible} with {@code that} unit.
-220 * @throws UnconvertibleException
-221 * if a converter cannot be constructed.
-222 *
-223 * @see #getConverterTo(Unit)
-224 * @see #isCompatible(Unit)
-225 */
-226 UnitConverter getConverterToAny(Unit<?> that) throws IncommensurableException, UnconvertibleException;
-227
-228 /**********************/
-229 /** Units Operations **/
-230 /**********************/
-231
-232 /**
-233 * Returns a system unit equivalent to this unscaled standard unit but used in expressions to distinguish between quantities of a different nature
-234 * but of the same dimensions.
-235 *
-236 * <p>
-237 * Examples of alternate units:
-238 * </p>
-239 *
-240 * <code>
-241 * {@literal Unit<Angle>} RADIAN = ONE.alternate("rad").asType(Angle.class);<br>
-242 * {@literal Unit<Force>} NEWTON = METRE.multiply(KILOGRAM).divide(SECOND.pow(2)).alternate("N").asType(Force.class);<br>
-243 * {@literal Unit<Pressure>} PASCAL = NEWTON.divide(METRE.pow(2)).alternate("Pa").asType(Pressure.class);<br>
-244 * </code>
-245 *
-246 * @param symbol
-247 * the new symbol for the alternate unit.
-248 * @return the alternate unit.
-249 * @throws IllegalArgumentException
-250 * if this unit is not an unscaled standard unit.
-251 * @throws MeasurementException
-252 * if the specified symbol is not valid or is already associated to a different unit.
-253 */
-254 Unit<Q> alternate(String symbol);
-255
-256 /**
-257 * Returns the result of setting the origin of the scale of measurement to the given value. The returned unit is convertible with all units that are
-258 * convertible with this unit. For example the following code:<br>
-259 *
-260 * <code>
-261 * CELSIUS = KELVIN.shift(273.15);
-262 * </code>
-263 *
-264 * creates a new unit where 0°C (the origin of the new unit) is equals to 273.15 K. Converting from the old unit to the new one is equivalent to
-265 * <em>subtracting</em> the offset to the value in the old unit.
-266 *
-267 * @param offset
-268 * the offset added (expressed in this unit).
-269 * @return this unit offset by the specified value.
-270 * @since 2.0
-271 */
-272 Unit<Q> shift(Number offset);
-273
-274 /**
-275 * Returns the result of setting the origin of the scale of measurement to the given value. The returned unit is convertible with all units that are
-276 * convertible with this unit. For example the following code:<br>
-277 *
-278 * <code>
-279 * CELSIUS = KELVIN.shift(273.15);
-280 * </code>
-281 *
-282 * creates a new unit where 0°C (the origin of the new unit) is equals to 273.15 K. Converting from the old unit to the new one is equivalent to
-283 * <em>subtracting</em> the offset to the value in the old unit.
-284 *
-285 * @param offset
-286 * the offset added (expressed in this unit).
-287 * @return this unit offset by the specified value.
-288 */
-289 Unit<Q> shift(double offset);
-290
-291 /**
-292 * Returns the result of multiplying this unit by the specified factor. If the factor is an integer value, the multiplication is exact
-293 * (recommended). For example:<br>
-294 *
-295 * <code>
-296 * FOOT = METRE.multiply(3048).divide(10000); // Exact definition.<br>
-297 * ELECTRON_MASS = KILOGRAM.multiply(9.10938188e-31); // Approximation.
-298 * </code>
-299 *
-300 * @param multiplier
-301 * the multiplier
-302 * @return this unit scaled by the specified multiplier.
-303 * @since 2.0
-304 */
-305 Unit<Q> multiply(Number multiplier);
-306
-307 /**
-308 * Returns the result of multiplying this unit by the specified factor. For example:<br>
-309 *
-310 * <code>
-311 * FOOT = METRE.multiply(3048).divide(10000); // Exact definition.<br>
-312 * ELECTRON_MASS = KILOGRAM.multiply(9.10938188e-31); // Approximation.
-313 * </code>
-314 *
-315 * @param multiplier
-316 * the multiplier
-317 * @return this unit scaled by the specified multiplier.
-318 */
-319 Unit<Q> multiply(double multiplier);
-320
-321 /**
-322 * Returns the product of this unit with the one specified.
-323 *
-324 * @param multiplier
-325 * the unit multiplier.
-326 * @return {@code this * multiplier}
-327 */
-328 Unit<?> multiply(Unit<?> multiplier);
-329
-330 /**
-331 * Returns the reciprocal (multiplicative inverse) of this unit.
-332 *
-333 * @return {@code 1 / this}
-334 * @see <a href="https://en.wikipedia.org/wiki/Multiplicative_inverse">Wikipedia: Multiplicative inverse</a>
-335 */
-336 Unit<?> inverse();
-337
-338 /**
-339 * Returns the result of dividing this unit by a divisor. If the factor is an integer value, the division is exact. For example:<br>
-340 *
-341 * <code>
-342 * GRAM = KILOGRAM.divide(1000); // Exact definition.
-343 * </code>
-344 *
-345 * @param divisor
-346 * the divisor value.
-347 * @return this unit divided by the specified divisor.
-348 * @since 2.0
-349 */
-350 Unit<Q> divide(Number divisor);
-351
-352 /**
-353 * Returns the result of dividing this unit by an approximate divisor. For example:<br>
-354 *
-355 * <code>
-356 * GRAM = KILOGRAM.divide(1000d);
-357 * </code>
-358 *
-359 * @param divisor
-360 * the divisor value.
-361 * @return this unit divided by the specified divisor.
-362 */
-363 Unit<Q> divide(double divisor);
-364
-365 /**
-366 * Returns the quotient of this unit with the one specified.
-367 *
-368 * @param divisor
-369 * the unit divisor.
-370 * @return {@code this / divisor}
-371 */
-372 Unit<?> divide(Unit<?> divisor);
-373
-374 /**
-375 * Returns an unit that is the n-th (integer) root of this unit. Equivalent to the mathematical expression {@code unit^(1/n)}.
-376 *
-377 * @param n
-378 * an integer giving the root's order as in 'n-th root'
-379 * @return the n-th root of this unit.
-380 * @throws ArithmeticException
-381 * if {@code n == 0} or if this operation would result in an unit with a fractional exponent.
-382 */
-383 Unit<?> root(int n);
-384
-385 /**
-386 * Returns an unit raised to the n-th (integer) power of this unit. Equivalent to the mathematical expression {@code unit^n}.
-387 *
-388 * @param n
-389 * the exponent.
-390 * @return the result of raising this unit to the exponent.
-391 */
-392 Unit<?> pow(int n);
-393
-394 /**
-395 * Returns the unit derived from this unit using the specified converter. The converter does not need to be linear. For example:<br>
-396 *
-397 * <pre>
-398 * {@literal Unit<Dimensionless>} DECIBEL = Unit.ONE.transform(
-399 * new LogConverter(10).inverse().concatenate(
-400 * new RationalConverter(1, 10)));
-401 * </pre>
-402 *
-403 * @param operation
-404 * the converter from the transformed unit to this unit.
-405 * @return the unit after the specified transformation.
-406 */
-407 Unit<Q> transform(UnitConverter operation);
-408
-409 /**
-410 * Returns a string representation of this unit. The string representation may be the unit {@linkplain #getSymbol() symbol}, or may be some
-411 * representation of {@linkplain #getBaseUnits() product units}, multiplication factor and offset if any.
-412 *
-413 * <p>
-414 * The string may be localized at implementation choice by the means of a particular device and platform.
-415 * </p>
-416 *
-417 * @return the string representation of this unit.
-418 *
-419 * @see #getSymbol()
-420 * @see javax.measure.format.UnitFormat
-421 */
-422 @Override
-423 String toString();
-424
-425 /**
-426 * Returns a new unit equal to this unit prefixed by the specified {@code prefix}.
-427 *
-428 * @param prefix
-429 * the prefix to apply on this unit.
-430 * @return the unit with the given prefix applied.
-431 * @since 2.0
-432 */
-433 Unit<Q> prefix(Prefix prefix);
-434}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure;
-031
-032import java.util.List;
-033
-034/**
-035 * A converter of numeric values between different units.
-036 *
-037 * <p>
-038 * Instances of this class are usually obtained through the {@link Unit#getConverterTo(Unit)} method.
-039 * </p>
-040 *
-041 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-042 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-043 * @author <a href="mailto:martin.desruisseaux@geomatys.com">Martin
-044 * Desruisseaux</a>
-045 * @author <a href="mailto:thodoris.bais@gmail.com">Thodoris Bais</a>
-046 * @author <a href="mailto:ahuber@apache.org">Andi Huber</a>
-047 * @version 1.4, May 12, 2019
-048 * @since 1.0
-049 *
-050 * @see Unit
-051 * @see <a href="http://en.wikipedia.org/wiki/Conversion_of_units"> Wikipedia: Conversion of units</a>
-052 */
-053public interface UnitConverter {
-054
-055 /**
-056 * Indicates if this converter is an identity converter. The identity converter returns its input argument ({@code convert(x) == x}).
-057 * <p>
-058 * Note: Identity converters are also always 'linear', see {@link UnitConverter#isLinear()}.
-059 * </p>
-060 *
-061 * @return {@code true} if this converter is an identity converter.
-062 */
-063 boolean isIdentity();
-064
-065 /**
-066 * Indicates whether this converter represents a (one-dimensional) linear transformation, that is
-067 * a <a href="https://en.wikipedia.org/wiki/Linear_map">linear map (wikipedia)</a> from a one-dimensional
-068 * vector space (a scalar) to a one-dimensional vector space. Typically from 'R' to 'R', with 'R' the
-069 * real numbers.
-070 *
-071 * <p>
-072 * Given such a 'linear' converter 'A', let 'u', 'v' and 'r' be arbitrary numbers, then the following
-073 * must hold by definition:
-074 *
-075 * <ul>
-076 * <li>{@code A(u + v) == A(u) + A(v)}</li>
-077 * <li>{@code A(r * u) == r * A(u)}</li>
-078 * </ul>
-079 *
-080 * <p>
-081 * Given a second 'linear' converter 'B', commutativity of composition follows by above definition:
-082 *
-083 * <ul>
-084 * <li>{@code (A o B) (u) == (B o A) (u)}</li>
-085 * </ul>
-086 *
-087 * In other words, two 'linear' converters do have the property that {@code A(B(u)) == B(A(u))}, meaning
-088 * for 'A' and 'B' the order of their composition does not matter. Expressed as Java code:
-089 *
-090 * <p>
-091 *{@code A.concatenate(B).convert(u) == B.concatenate(A).convert(u)}
-092 * </p>
-093 *
-094 * Note: For composing UnitConverters see also {@link UnitConverter#concatenate(UnitConverter)}.
-095 *
-096 * @return {@code true} if this converter represents a linear transformation;
-097 * {@code false} otherwise.
-098 *
-099 */
-100 boolean isLinear();
-101
-102 /**
-103 * Returns the inverse of this converter. If {@code x} is a valid value, then {@code x == inverse().convert(convert(x))} to within the accuracy of
-104 * computer arithmetic.
-105 *
-106 * @return the inverse of this converter.
-107 */
-108 UnitConverter inverse();
-109
-110 /**
-111 * Converts a {@code Number} value.
-112 *
-113 * @param value
-114 * the {@code Number} value to convert.
-115 * @return the {@code Number} value after conversion.
-116 */
-117 Number convert(Number value);
-118
-119 /**
-120 * Converts a {@code double} value.
-121 *
-122 * @param value
-123 * the numeric value to convert.
-124 * @return the {@code double} value after conversion.
-125 */
-126 double convert(double value);
-127
-128 /**
-129 * Concatenates this converter with another converter. The resulting converter is equivalent to first converting by the specified converter (right
-130 * converter), and then converting by this converter (left converter).
-131 *
-132 * @param converter
-133 * the other converter to concatenate with this converter.
-134 * @return the concatenation of this converter with the other converter.
-135 */
-136 UnitConverter concatenate(UnitConverter converter);
-137
-138 /**
-139 * <p>
-140 * Returns the steps of fundamental converters making up this converter or {@code this} if the converter is a fundamental converter.
-141 * </p>
-142 * <p>
-143 * For example, {@code converter1.getConversionSteps()} returns {@code converter1} while
-144 * {@code converter1.concatenate(converter2).getConversionSteps()} returns {@code converter1, converter2}.
-145 * </p>
-146 *
-147 * @return the list of fundamental converters which concatenated make up this converter.
-148 */
-149 List<? extends UnitConverter> getConversionSteps();
-150}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.format;
-031
-032import javax.measure.MeasurementException;
-033
-034/**
-035 * Signals that an error has been reached unexpectedly while parsing.
-036 *
-037 * @author Werner Keil
-038 * @version 1.1, March 27, 2018
-039 * @since 2.0
-040 */
-041public class MeasurementParseException extends MeasurementException {
-042
-043 /**
-044 * For cross-version compatibility.
-045 */
-046 private static final long serialVersionUID = 2727457045794254852L;
-047
-048 /**
-049 * The zero-based character position in the string being parsed at which the error was found while parsing.
-050 *
-051 * @serial
-052 */
-053 private int position;
-054
-055 /** The original input data. */
-056 private CharSequence data;
-057
-058 /**
-059 * Constructs a MeasurementParseException with the specified detail message, parsed text and index. A detail message is a String that describes
-060 * this particular exception.
-061 *
-062 * @param message
-063 * the detail message
-064 * @param parsedData
-065 * the parsed text, should not be null
-066 * @param position
-067 * the position where the error was found while parsing.
-068 */
-069 public MeasurementParseException(String message, CharSequence parsedData, int position) {
-070 super(message);
-071 this.data = parsedData;
-072 this.position = position;
-073 }
-074
-075 /**
-076 * Constructs a MeasurementParseException with the parsed text and offset. A detail message is a String that describes this particular exception.
-077 *
-078 * @param parsedData
-079 * the parsed text, should not be null
-080 * @param position
-081 * the position where the error is found while parsing.
-082 */
-083 public MeasurementParseException(CharSequence parsedData, int position) {
-084 this("Parse Error", parsedData, position);
-085 }
-086
-087 /**
-088 * Constructs a MeasurementParseException with the specified cause.
-089 *
-090 * @param cause
-091 * the root cause
-092 */
-093 public MeasurementParseException(Throwable cause) {
-094 super(cause);
-095 }
-096
-097 /**
-098 * Constructs a MeasurementParseException with the specified detail message.
-099 *
-100 * @param message
-101 * the detail message
-102 */
-103 public MeasurementParseException(String message) {
-104 super(message);
-105 }
-106
-107 /**
-108 * Returns the position where the error was found.
-109 *
-110 * @return the position of the error
-111 */
-112 public int getPosition() {
-113 return position;
-114 }
-115
-116 /**
-117 * Returns the string that was being parsed.
-118 *
-119 * @return the parsed string, or {@code null}, if {@code null} was passed as input.
-120 */
-121 public String getParsedString() {
-122 if (data == null) {
-123 return null;
-124 }
-125 return data.toString();
-126 }
-127}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.format;
-031
-032import java.io.IOException;
-033import java.text.ParsePosition;
-034
-035import javax.measure.Quantity;
-036
-037/**
-038 * Formats instances of {@link Quantity}.
-039 *
-040 * <dl>
-041 * <dt><span class="strong"><a id="synchronization">Synchronization</a></span></dt>
-042 * </dl>
-043 * Instances of this class are not required to be thread-safe. It is recommended to use separate format instances for each thread. If multiple threads
-044 * access a format concurrently, it must be synchronized externally.
-045 *
-046 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-047 * @author <a href="mailto:thodoris.bais@gmail.com">Thodoris Bais</a>
-048 *
-049 * @version 1.1, 20 May, 2023
-050 * @since 2.0
-051 *
-052 * @see Quantity
-053 */
-054public interface QuantityFormat {
-055
-056 /**
-057 * Formats the specified quantity into an {@code Appendable}.
-058 *
-059 * @param quantity
-060 * the quantity to format.
-061 * @param destination
-062 * the appendable destination.
-063 * @return the specified {@code Appendable}.
-064 * @throws IOException
-065 * if an I/O exception occurs.
-066 */
-067 public Appendable format(Quantity<?> quantity, Appendable destination) throws IOException;
-068
-069 /**
-070 * Formats the specified {@link Quantity}.
-071 *
-072 * @param quantity
-073 * the {@link Quantity} to format, not {@code null}
-074 * @return the string representation using the settings of this {@link QuantityFormat}.
-075 */
-076 String format(Quantity<?> quantity);
-077
-078 /**
-079 * Parses a portion of the specified {@code CharSequence} from the specified position to produce a {@link Quantity}.
-080 * If parsing succeeds, then the index of the {@code pos} argument is updated to the index after the last character used.
-081 *
-082 * @param csq
-083 * the {@code CharSequence} to parse.
-084 * @param pos
-085 * a ParsePosition object holding the current parsing index and error parsing index information as described above.
-086 * @return the quantity parsed from the specified character sub-sequence.
-087 * @throws MeasurementParseException
-088 * if any problem occurs while parsing the specified character sequence (e.g. illegal syntax).
-089 */
-090 public Quantity<?> parse(CharSequence csq, ParsePosition pos) throws MeasurementParseException;
-091
-092 /**
-093 * Parses the specified {@code CharSequence} to produce a {@link Quantity}.
-094 * <p>
-095 * The parse must complete normally and parse the entire text. If the parse completes without reading the entire length of the text, an exception
-096 * is thrown. If any other problem occurs during parsing, an exception is thrown.
-097 * </p>
-098 *
-099 * @param csq
-100 * the {@code CharSequence} to parse.
-101 * @return the quantity parsed from the specified character sub-sequence.
-102 * @throws MeasurementParseException
-103 * if any problem occurs while parsing the specified character sequence (e.g. illegal syntax).
-104 */
-105 public Quantity<?> parse(CharSequence csq) throws MeasurementParseException;
-106
-107 /**
-108 * Returns {@code true} if this {@link QuantityFormat} depends on a {@code Locale} to perform its tasks.
-109 * <p>
-110 * In environments that do not support a {@code Locale}, e.g. Java ME, this usually returns {@code false}.
-111 * </p>
-112 *
-113 * @return whether this format depends on the locale.
-114 */
-115 default boolean isLocaleSensitive() {
-116 return false;
-117 }
-118}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.format;
-031
-032import java.io.IOException;
-033import java.text.ParsePosition;
-034
-035import javax.measure.Unit;
-036
-037/**
-038 * Formats instances of {@link Unit} to a {@link String} or {@link Appendable} and parses a {@link CharSequence} to a {@link Unit}.
-039 *
-040 * <dl>
-041 * <dt><span class="strong"><a id="synchronization">Synchronization</a></span></dt>
-042 * </dl>
-043 * <p>
-044 * Instances of this class are not required to be thread-safe. It is recommended to use separate format instances for each thread. If multiple threads
-045 * access a format concurrently, it must be synchronized externally.
-046 * </p>
-047 *
-048 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-049 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-050 *
-051 * @version 2.2, May 20, 2023
-052 * @since 1.0
-053 *
-054 * @see Unit
-055 */
-056public interface UnitFormat {
-057 /**
-058 * Formats the specified {@link Unit}.
-059 *
-060 * @param unit
-061 * the {@link Unit} to format, not {@code null}
-062 * @param appendable
-063 * the appendable destination.
-064 * @return the appendable destination passed in with formatted text appended.
-065 * @throws IOException
-066 * if an error occurs while writing to the destination.
-067 */
-068 Appendable format(Unit<?> unit, Appendable appendable) throws IOException;
-069
-070 /**
-071 * Formats the specified {@link Unit}.
-072 *
-073 * @param unit
-074 * the {@link Unit} to format, not {@code null}
-075 * @return the string representation using the settings of this {@link UnitFormat}.
-076 */
-077 String format(Unit<?> unit);
-078
-079 /**
-080 * Attaches a system-wide label to the specified {@link Unit}.
-081 * <p>
-082 * This method overrides the previous unit's label (e.g. label from unit database or unit system) as units may only have one label. Depending on the
-083 * {@link UnitFormat} implementation, this call may be ignored if the particular unit already has a label.
-084 * </p>
-085 * If a {@link UnitFormat} implementation is explicitly <b>immutable</b>, similar to e.g. the result of <code>Collections.unmodifiableList()</code>,
-086 * then an {@linkplain UnsupportedOperationException} may be thrown upon this call.
-087 * <p>
-088 * Since <code>UnitFormat</code> implementations often apply the Singleton pattern, <b>system-wide</b> means, the label applies to every instance of
-089 * <code>UnitFormatA</code> implementing <code>UnitFormat</code> in this case, but not every instance of <code>UnitFormatB</code> or <code>UnitFormatC</code> both
-090 * also implementing <code>UnitFormat</code>. If a <code>UnitFormat</code> #isLocaleSensitive() it is up to the implementation, whether the label is
-091 * ignored, applied in a local-neutral manner (in addition to its local-sensitive information) or locale-specific.
-092 * </p>
-093 *
-094 * @param unit
-095 * the unit being labeled.
-096 * @param label
-097 * the new label for this unit.
-098 * @throws IllegalArgumentException
-099 * if the label is not a valid identifier. This may include characters not supported by a particular {@link UnitFormat} implementation
-100 * (e.g. only <b>ASCII</b> characters for certain devices)
-101 * @throws UnsupportedOperationException
-102 * if the <code>label</code> operation is not supported by this {@link UnitFormat}
-103 */
-104 void label(Unit<?> unit, String label);
-105
-106 /**
-107 * Returns <code>true</code> if this {@link UnitFormat} depends on a <code>Locale</code> to perform its tasks.
-108 * <p>
-109 * In environments that do not support a <code>Locale</code>, e.g. Java ME, this usually returns <code>false</code>.
-110 * </p>
-111 *
-112 * @return Whether this format depends on a locale.
-113 */
-114 default boolean isLocaleSensitive() {
-115 return false;
-116 }
-117
-118 /**
-119 * Parses a portion of the specified <code>CharSequence</code> from the specified position to produce a {@link Unit}.
-120 * If parsing succeeds, then the index of the <code>pos</code> argument is updated to the index after the last character used.
-121 *
-122 * @param csq
-123 * the <code>CharSequence</code> to parse.
-124 * @param pos
-125 * a ParsePosition object holding the current parsing index and error parsing index information as described above.
-126 * @return the unit parsed from the specified character sub-sequence.
-127 * @throws MeasurementParseException
-128 * if any problem occurs while parsing the specified character sequence (e.g. illegal syntax).
-129 * @since 2.0
-130 */
-131 Unit<?> parse(CharSequence csq, ParsePosition pos) throws MeasurementParseException;
-132
-133 /**
-134 * Parses the text into an instance of {@link Unit}.
-135 * <p>
-136 * The parse must complete normally and parse the entire text. If the parse completes without reading the entire length of the text, an exception
-137 * is thrown. If any other problem occurs during parsing, an exception is thrown.
-138 * </p>
-139 *
-140 * @param csq
-141 * the {@code CharSequence} to parse.
-142 * @return the unit parsed from the specified character sequence.
-143 * @throws MeasurementParseException
-144 * if any problem occurs while parsing the specified character sequence (e.g. illegal syntax).
-145 * @throws UnsupportedOperationException
-146 * if the {@link UnitFormat} is unable to parse.
-147 * @since 2.0
-148 */
-149 Unit<?> parse(CharSequence csq) throws MeasurementParseException;
-150}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Rate of change of velocity with respect to time. The metric system unit for this quantity is "m/s²" (metre per square second).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-039 * @version 1.2
-040 * @since 1.0
-041 * @see <a href="https://en.wikipedia.org/wiki/Acceleration">Wikipedia: Acceleration</a>
-042 *
-043 * @see Length
-044 * @see Speed
-045 * @see Time
-046 */
-047public interface Acceleration extends Quantity<Acceleration> {
-048}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Number of elementary entities (molecules, for example) of a substance. The metric system unit for this quantity is "mol" (mole).
-036 *
-037 * The mole, symbol mol, is the SI unit of amount of substance. One mole contains
-038 * exactly 6.022 140 76 × 10²³ elementary entities. This number is the fixed numerical
-039 * value of the Avogadro constant, NA, when expressed in the unit mol⁻¹ and is called
-040 * the Avogadro number.
-041 *
-042 * The amount of substance, symbol n, of a system is a measure of the number of
-043 * specified elementary entities. An elementary entity may be an atom, a molecule, an
-044 * ion, an electron, any other particle or specified group of particles.
-045 * This definition implies the exact relation Nₐ = 6.022 140 76 × 10²³ mol⁻¹.
-046 *
-047 * Inverting this relation gives an exact expression for the mole in terms of the defining constant NA:
-048 *
-049 * 1 mol = 6.02214076 × 10²³ / Nₐ
-050 * <br>
-051 * <dl>
-052 * <dt><span class="strong">API Note:</span></dt><dd>SI Base Unit</dd>
-053 * </dl>
-054 *
-055 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-056 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-057 * @author <a href="mailto:thodoris.bais@gmail.com">Thodoris Bais</a>
-058 * @version 2.1
-059 * @since 1.0
-060 *
-061 * @see <a href="http://en.wikipedia.org/wiki/Amount_of_substance">Wikipedia: Amount of Substance</a>
-062 */
-063public interface AmountOfSubstance extends Quantity<AmountOfSubstance> {
-064}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Figure formed by two lines diverging from a common point. The metric system unit for this quantity is "rad" (radian).
-036 * <br>
-037 * <dl>
-038 * <dt><span class="strong">API Note:</span></dt><dd>SI Derived Unit with special name and symbol</dd>
-039 * </dl>
-040 *
-041 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-042 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-043 * @version 2.0
-044 * @since 1.0
-045 *
-046 * @see <a href="http://en.wikipedia.org/wiki/Angle">Wikipedia: Angle</a>
-047 *
-048 * @see SolidAngle
-049 * @see Length
-050 */
-051public interface Angle extends Quantity<Angle> {
-052}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Extent of a planar region or of the surface of a solid measured in square units. The metric system unit for this quantity is "m²" (square metre).
-036 * <br>
-037 * <dl>
-038 * <dt><span class="strong">API Note:</span></dt><dd>SI Derived Unit</dd>
-039 * </dl>
-040 *
-041 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-042 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-043 * @version 2.0
-044 * @since 1.0
-045 *
-046 * @see Length
-047 * @see Volume
-048 * @see Pressure
-049 */
-050public interface Area extends Quantity<Area> {
-051}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Catalytic activity. The metric system unit for this quantity is "kat" (katal).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.0
-039 * @since 1.0
-040 */
-041public interface CatalyticActivity extends Quantity<CatalyticActivity> {
-042}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Dimensionless quantity.
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.0
-039 * @since 1.0
-040 */
-041public interface Dimensionless extends Quantity<Dimensionless> {
-042}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Electric capacitance. The metric system unit for this quantity is "F" (Farad).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.0
-039 * @since 1.0
-040 */
-041public interface ElectricCapacitance extends Quantity<ElectricCapacitance> {
-042}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Electric charge. The metric system unit for this quantity is "C" (Coulomb).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.0
-039 * @since 1.0
-040 *
-041 * @see ElectricCurrent
-042 */
-043public interface ElectricCharge extends Quantity<ElectricCharge> {
-044}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Electric conductance. The metric system unit for this quantity "S" (Siemens).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.0
-039 * @since 1.0
-040 */
-041public interface ElectricConductance extends Quantity<ElectricConductance> {
-042}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Amount of electric charge flowing past a specified circuit point per unit time. The metric system unit for this quantity is "A" (Ampere).
-036 *
-037 * The ampere, symbol A, is the SI unit of electric current. It is defined by taking the
-038 * fixed numerical value of the elementary charge e to be 1.602 176 634 × 10⁻¹⁹ when
-039 * expressed in the unit C, which is equal to A s, where the second is defined in terms
-040 * of ∆νCs.
-041 *
-042 * This definition implies the exact relation e = 1.602 176 634 × 10⁻¹⁹ A s. Inverting this
-043 * relation gives an exact expression for the unit ampere in terms of the defining constants e
-044 * and ∆νCs:
-045 *
-046 * 1 A = (e / 1.602 176 634 × 10⁻¹⁹) s⁻¹
-047 * <br>
-048 * <dl>
-049 * <dt><span class="strong">API Note:</span></dt><dd>SI Base Unit</dd>
-050 * </dl>
-051 *
-052 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-053 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-054 * @author <a href="mailto:thodoris.bais@gmail.com">Thodoris Bais</a>
-055 * @version 2.1
-056 * @since 1.0
-057 * @see <a href="https://en.wikipedia.org/wiki/Electric_current">Wikipedia: Electric Current</a>
-058 * @see ElectricCharge
-059 * @see Time
-060 */
-061public interface ElectricCurrent extends Quantity<ElectricCurrent> {
-062}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Electric inductance. The metric system unit for this quantity is "H" (Henry).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.0
-039 * @since 1.0
-040 */
-041public interface ElectricInductance extends Quantity<ElectricInductance> {
-042}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Electric potential or electromotive force. The metric system unit for this quantity is "V" (Volt).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.0
-039 * @since 1.0
-040 */
-041public interface ElectricPotential extends Quantity<ElectricPotential> {
-042}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Electric resistance. The metric system unit for this quantity is "Ohm" (Ω).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.0
-039 * @since 1.0
-040 */
-041public interface ElectricResistance extends Quantity<ElectricResistance> {
-042}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Capacity of a physical system to do work. The metric system unit for this quantity "J" (Joule).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.0
-039 * @since 1.0
-040 *
-041 * @see Force
-042 * @see Power
-043 * @see Time
-044 */
-045public interface Energy extends Quantity<Energy> {
-046}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Quantity that tends to produce an acceleration of a body in the direction of its application. The metric system unit for this quantity is "N"
-036 * (Newton).
-037 *
-038 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-039 * @version 1.1
-040 * @since 1.0
-041 *
-042 * @see Energy
-043 * @see Pressure
-044 */
-045public interface Force extends Quantity<Force> {
-046}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Number of times a specified phenomenon occurs within a specified interval. The metric system unit for this quantity is "Hz" (Hertz).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.0
-039 * @since 1.0
-040 *
-041 * @see Time
-042 */
-043public interface Frequency extends Quantity<Frequency> {
-044}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Illuminance. The metric system unit for this quantity is "lx" (lux).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.0
-039 * @since 1.0
-040 */
-041public interface Illuminance extends Quantity<Illuminance> {
-042}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Extent of something along its greatest dimension or the extent of space between two objects or places.
-036 * The metric system unit for this quantity is "m" (metre).
-037 *
-038 * The metre, symbol m, is the SI unit of length. It is defined by taking the fixed
-039 * numerical value of the speed of light in vacuum c to be 299 792 458 when expressed
-040 * in the unit m s⁻¹, where the second is defined in terms of the caesium frequency
-041 * ∆νCs.
-042 *
-043 * This definition implies the exact relation c = 299 792 458 m s⁻¹. Inverting this relation
-044 * gives an exact expression for the metre in terms of the defining constants c and ∆νCs:
-045 *
-046 * 1 m = (c / 299 792 458)s = 9 192 631 770 c / 299 792 458 ∆νCs ≈ 30.663 319 c / ∆νCs
-047 * <br>
-048 * <dl>
-049 * <dt><span class="strong">API Note:</span></dt><dd>SI Base Unit</dd>
-050 * </dl>
-051 *
-052 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-053 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-054 * @author <a href="mailto:thodoris.bais@gmail.com">Thodoris Bais</a>
-055 * @version 2.1
-056 * @since 1.0
-057 *
-058 * @see <a href="https://en.wikipedia.org/wiki/Length">Wikipedia: Length</a>
-059 * @see Area
-060 * @see Volume
-061 * @see Angle
-062 * @see SolidAngle
-063 * @see Speed
-064 */
-065public interface Length extends Quantity<Length> {
-066}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Luminous flux. The metric system unit for this quantity is "lm" (lumen).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.1
-039 * @since 1.0
-040 */
-041public interface LuminousFlux extends Quantity<LuminousFlux> {
-042}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Luminous flux density per solid angle as measured in a given direction relative to the emitting source.
-036 * The metric system unit for this quantity is "cd" (candela).
-037 *
-038 * The candela, symbol cd, is the SI unit of luminous intensity in a given direction. It is
-039 * defined by taking the fixed numerical value of the luminous efficacy of
-040 * monochromatic radiation of frequency 540 × 10¹² Hz, Kcd, to be 683 when expressed
-041 * in the unit lm W−1, which is equal to cd sr W⁻¹, or cd sr kg⁻¹ m⁻² s³, where the kilogram,
-042 * metre and second are defined in terms of h, c and ∆νCs.
-043 *
-044 * This definition implies the exact relation Kcd = 683 cd sr kg⁻¹ m⁻² s³ for monochromatic
-045 * radiation of frequency ν = 540 × 10¹² Hz. Inverting this relation gives an exact expression
-046 * for the candela in terms of the defining constants Kcd, h and ∆νCs:
-047 *
-048 * 1 cd = (Kcd / 683) kg m² s⁻³ sr⁻¹
-049 * <br>
-050 * <dl>
-051 * <dt><span class="strong">API Note:</span></dt><dd>SI Base Unit</dd>
-052 * </dl>
-053 *
-054 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-055 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-056 * @author <a href="mailto:thodoris.bais@gmail.com">Thodoris Bais</a>
-057 * @version 2.1
-058 * @since 1.0
-059 *
-060 * @see <a href="https://en.wikipedia.org/wiki/Luminous_intensity">Wikipedia: Luminous intensity</a>
-061 */
-062public interface LuminousIntensity extends Quantity<LuminousIntensity> {
-063}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Magnetic flux. The metric system unit for this quantity is "Wb" (Weber).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.0
-039 * @since 1.0
-040 */
-041public interface MagneticFlux extends Quantity<MagneticFlux> {
-042}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Magnetic flux density. The metric system unit for this quantity is "T" (Tesla).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.0
-039 * @since 1.0
-040 */
-041public interface MagneticFluxDensity extends Quantity<MagneticFluxDensity> {
-042}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Measure of the quantity of matter that a body or an object contains. The mass of the body is not dependent on gravity and therefore is different
-036 * from but proportional to its weight. The metric system unit for this quantity is "kg" (kilogram).
-037 *
-038 * The kilogram, symbol kg, is the SI unit of mass. It is defined by taking the fixed
-039 * numerical value of the Planck constant h to be 6.626 070 15 × 10⁻³⁴ when expressed
-040 * in the unit J s, which is equal to kg m² s−1, where the metre and the second are
-041 * defined in terms of c and ∆νCs.
-042 *
-043 * This definition implies the exact relation h = 6.626 070 15 × 10−34 kg m² s⁻¹. Inverting this
-044 * relation gives an exact expression for the kilogram in terms of the three defining constants
-045 * h, ∆νCs and c:
-046 *
-047 * 1 kg = (h / 6.626 070 15 × 10⁻³⁴) m⁻² s
-048 * <br>
-049 * <dl>
-050 * <dt><span class="strong">API Note:</span></dt><dd>SI Base Unit</dd>
-051 * </dl>
-052 *
-053 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-054 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-055 * @author <a href="mailto:thodoris.bais@gmail.com">Thodoris Bais</a>
-056 * @version 2.0
-057 * @since 1.0
-058 *
-059 * @see <a href="https://en.wikipedia.org/wiki/Mass">Wikipedia: Mass</a>
-060 * @see RadiationDoseAbsorbed
-061 */
-062public interface Mass extends Quantity<Mass> {
-063}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Rate at which work is done. The metric system unit for this quantity is "W" (Watt).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.0
-039 * @since 1.0
-040 *
-041 * @see Energy
-042 * @see Time
-043 */
-044public interface Power extends Quantity<Power> {
-045}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Force applied uniformly over a surface. The metric system unit for this quantity is "Pa" (Pascal).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.0
-039 * @since 1.0
-040 *
-041 * @see Force
-042 * @see Area
-043 */
-044public interface Pressure extends Quantity<Pressure> {
-045}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Amount of energy deposited per unit of mass. The system unit for this quantity is "Gy" (Gray).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @version 1.1
-039 * @since 1.0
-040 *
-041 * @see Mass
-042 */
-043public interface RadiationDoseAbsorbed extends Quantity<RadiationDoseAbsorbed> {
-044}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Effective (or "equivalent") dose of radiation received by a human or some other living organism. The metric system unit for this quantity is "Sv"
-036 * (Sievert).
-037 *
-038 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-039 * @version 1.0
-040 * @since 1.0
-041 */
-042public interface RadiationDoseEffective extends Quantity<RadiationDoseEffective> {
-043}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Radioactive activity. The metric system unit for this quantity is "Bq" (Becquerel).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-039 * @author Martin Desruisseaux
-040 * @version 1.2
-041 * @since 1.0
-042 */
-043public interface Radioactivity extends Quantity<Radioactivity> {
-044}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Angle formed by three or more planes intersecting at a common point. The metric system unit for this quantity is "sr" (steradian).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-039 * @version 1.3
-040 * @since 1.0
-041 *
-042 * @see Angle
-043 */
-044public interface SolidAngle extends Quantity<SolidAngle> {
-045}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Distance traveled divided by the time of travel. The metric system unit for this quantity is "m/s" (metre per second).
-036 *
-037 * <p>
-038 * <cite>Speed</cite> is a scalar value, while <cite>velocity</cite> is a vector. Speed is the magnitude of the velocity vector, or the components of
-039 * the velocity vector.
-040 * </p>
-041 *
-042 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-043 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-044 * @version 1.2
-045 * @since 1.0
-046 *
-047 * @see Length
-048 * @see Time
-049 * @see Acceleration
-050 * @see <a href="http://en.wikipedia.org/wiki/Speed">Wikipedia: Speed</a>
-051 */
-052public interface Speed extends Quantity<Speed> {
-053}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Degree of hotness or coldness of a body or an environment. The metric system unit for this quantity is "K" (Kelvin).
-036 *
-037 * The kelvin, symbol K, is the SI unit of thermodynamic temperature. It is defined by
-038 * taking the fixed numerical value of the Boltzmann constant k to be 1.380 649 × 10−²³
-039 * when expressed in the unit J K⁻¹, which is equal to kg m² s⁻² K⁻¹, where the
-040 * kilogram, metre and second are defined in terms of h, c and ∆νCs.
-041 *
-042 * This definition implies the exact relation k = 1.380 649 × 10⁻²³ kg m² s⁻² K⁻¹. Inverting this
-043 * relation gives an exact expression for the kelvin in terms of the defining constants k, h and
-044 * ∆νCs:
-045 *
-046 * 1 K = (1.380 649 / k) × 10⁻²³ kg m² s⁻²
-047 * <br>
-048 * <dl>
-049 * <dt><span class="strong">API Note:</span></dt><dd>SI Base Unit</dd>
-050 * </dl>
-051 *
-052 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-053 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-054 * @author <a href="mailto:thodoris.bais@gmail.com">Thodoris Bais</a>
-055 * @version 2.1
-056 * @since 1.0
-057 *
-058 * @see <a href="https://en.wikipedia.org/wiki/Temperature">Wikipedia: Temperature</a>
-059 */
-060public interface Temperature extends Quantity<Temperature> {
-061}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Period of existence or persistence. The metric system unit for this quantity is "s" (second).
-036 *
-037 * The second, symbol s, is the SI unit of time. It is defined by taking the fixed
-038 * numerical value of the caesium frequency ∆νCs, the unperturbed ground-state
-039 * hyperfine transition frequency of the caesium 133 atom, to be 9 192 631 770 when
-040 * expressed in the unit Hz, which is equal to s⁻¹.
-041 *
-042 * This definition implies the exact relation ∆νCs = 9 192 631 770 Hz. Inverting this relation
-043 * gives an expression for the unit second in terms of the defining constant ∆νCs:
-044 *
-045 * 1 Hz = ∆νCs / 9 192 631 770 or 1 s = 9 192 631 770 / ∆νCs
-046 * <br>
-047 * <dl>
-048 * <dt><span class="strong">API Note:</span></dt><dd>SI Base Unit</dd>
-049 * </dl>
-050 *
-051 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-052 * @author <a href="mailto:thodoris.bais@gmail.com">Thodoris Bais</a>
-053 * @version 2.1
-054 * @since 1.0
-055 *
-056 * @see Frequency
-057 * @see Speed
-058 * @see Acceleration
-059 * @see ElectricCurrent
-060 * @see Power
-061 * @see <a href="https://en.wikipedia.org/wiki/Unit_of_time">Wikipedia: Unit of time</a>
-062 */
-063public interface Time extends Quantity<Time> {
-064}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.quantity;
-031
-032import javax.measure.Quantity;
-033
-034/**
-035 * Amount of space occupied by a three-dimensional object or region of space. The metric system unit for this quantity is "m³" (cubic metre).
-036 *
-037 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-038 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-039 * @version 1.3
-040 * @since 1.0
-041 *
-042 * @see Length
-043 * @see Area
-044 */
-045public interface Volume extends Quantity<Volume> {
-046}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.spi;
-031
-032import java.util.Set;
-033
-034import javax.measure.format.QuantityFormat;
-035import javax.measure.format.UnitFormat;
-036
-037/**
-038 * This interface represents the service to obtain instances of {@link UnitFormat} and {@link QuantityFormat}.
-039 *
-040 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-041 * @version 2.3, May 20, 2023
-042 * @since 2.0
-043 */
-044public interface FormatService {
-045
-046 /** The type of format, either a {@link UnitFormat} or {@link QuantityFormat} */
-047 public static enum FormatType {
-048 /** Format of type {@link UnitFormat} */
-049 UNIT_FORMAT,
-050 /** Format of type {@link QuantityFormat} */
-051 QUANTITY_FORMAT
-052 }
-053
-054 /**
-055 * Returns the default quantity format.
-056 *
-057 * It is up to implementations what to consider a suitable default. For some (locale-sensitive) implementations it may be a quantity format based on
-058 * {@code Locale.current()} while others may return {@code getQuantityFormat("Simple")} or {@code getQuantityFormat("ISO")}.
-059 *
-060 * @return the default {@link QuantityFormat} implementation.
-061 */
-062 QuantityFormat getQuantityFormat();
-063
-064 /**
-065 * Returns the quantity format having the specified name or {@code null} if none.
-066 *
-067 * For example (@code getQuantityFormat("Simple")} to return the simple {@link QuantityFormat} implementation.
-068 *
-069 * @param name
-070 * the name of the format.
-071 * @return the corresponding quantity format.
-072 */
-073 QuantityFormat getQuantityFormat(String name);
-074
-075 /**
-076 * Returns the default unit format.
-077 *
-078 * It is up to implementations what to consider a suitable default. For some (locale-sensitive) implementations it may be a unit format based on
-079 * {@code Locale.current()} while others may return {@code getUnitFormat("Simple")} or {@code getUnitFormat("ISO")}.
-080 *
-081 * @return the default {@link UnitFormat} implementation.
-082 */
-083 UnitFormat getUnitFormat();
-084
-085 /**
-086 * Returns the unit format having the specified name or {@code null} if none.
-087 *
-088 * For example {@code getUnitFormat("Simple")} to return a simple {@link UnitFormat} implementation.
-089 *
-090 * @param name
-091 * the name of the format.
-092 * @return the corresponding unit format.
-093 */
-094 UnitFormat getUnitFormat(String name);
-095
-096 /**
-097 * Returns the unit format having the specified name or {@code null} if none.
-098 *
-099 * For example {@code getUnitFormat("Simple")} to return a simple {@link UnitFormat} implementation.<br>
-100 * The variant is an arbitrary value to allow a variation of a {@link UnitFormat},
-101 * for example <code>UTF</code> vs. <code>ASCII</code> encoding of the simple <code>UnitFormat</code>
-102 * or <code>case sensitive</code> vs. <code>case insensitive</code> <a href="https://ucum.org/ucum.html">UCUM</a> format.
-103 * <p>If no variant is applicable, the <code>UnitFormat</code> matching the name only is returned.</p>
-104 * @param name
-105 * the name of the format.
-106 * @param variant any arbitrary value used to indicate a variation of a <code>UnitFormat</code>.
-107 * @return the corresponding unit format.
-108 */
-109 UnitFormat getUnitFormat(String name, String variant);
-110
-111 /**
-112 * Gets a list with available format names of a given type for this format service.
-113 *
-114 * @param type
-115 * the {@link FormatType}
-116 * @return list of available formats, never null.
-117 */
-118 Set<String> getAvailableFormatNames(FormatType type);
-119}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.spi;
-031
-032import java.util.Set;
-033
-034import javax.measure.format.QuantityFormat;
-035import javax.measure.format.UnitFormat;
-036
-037/**
-038 * This interface represents the service to obtain instances of {@link UnitFormat} and {@link QuantityFormat}.
-039 *
-040 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-041 * @version 2.3, May 20, 2023
-042 * @since 2.0
-043 */
-044public interface FormatService {
-045
-046 /** The type of format, either a {@link UnitFormat} or {@link QuantityFormat} */
-047 public static enum FormatType {
-048 /** Format of type {@link UnitFormat} */
-049 UNIT_FORMAT,
-050 /** Format of type {@link QuantityFormat} */
-051 QUANTITY_FORMAT
-052 }
-053
-054 /**
-055 * Returns the default quantity format.
-056 *
-057 * It is up to implementations what to consider a suitable default. For some (locale-sensitive) implementations it may be a quantity format based on
-058 * {@code Locale.current()} while others may return {@code getQuantityFormat("Simple")} or {@code getQuantityFormat("ISO")}.
-059 *
-060 * @return the default {@link QuantityFormat} implementation.
-061 */
-062 QuantityFormat getQuantityFormat();
-063
-064 /**
-065 * Returns the quantity format having the specified name or {@code null} if none.
-066 *
-067 * For example (@code getQuantityFormat("Simple")} to return the simple {@link QuantityFormat} implementation.
-068 *
-069 * @param name
-070 * the name of the format.
-071 * @return the corresponding quantity format.
-072 */
-073 QuantityFormat getQuantityFormat(String name);
-074
-075 /**
-076 * Returns the default unit format.
-077 *
-078 * It is up to implementations what to consider a suitable default. For some (locale-sensitive) implementations it may be a unit format based on
-079 * {@code Locale.current()} while others may return {@code getUnitFormat("Simple")} or {@code getUnitFormat("ISO")}.
-080 *
-081 * @return the default {@link UnitFormat} implementation.
-082 */
-083 UnitFormat getUnitFormat();
-084
-085 /**
-086 * Returns the unit format having the specified name or {@code null} if none.
-087 *
-088 * For example {@code getUnitFormat("Simple")} to return a simple {@link UnitFormat} implementation.
-089 *
-090 * @param name
-091 * the name of the format.
-092 * @return the corresponding unit format.
-093 */
-094 UnitFormat getUnitFormat(String name);
-095
-096 /**
-097 * Returns the unit format having the specified name or {@code null} if none.
-098 *
-099 * For example {@code getUnitFormat("Simple")} to return a simple {@link UnitFormat} implementation.<br>
-100 * The variant is an arbitrary value to allow a variation of a {@link UnitFormat},
-101 * for example <code>UTF</code> vs. <code>ASCII</code> encoding of the simple <code>UnitFormat</code>
-102 * or <code>case sensitive</code> vs. <code>case insensitive</code> <a href="https://ucum.org/ucum.html">UCUM</a> format.
-103 * <p>If no variant is applicable, the <code>UnitFormat</code> matching the name only is returned.</p>
-104 * @param name
-105 * the name of the format.
-106 * @param variant any arbitrary value used to indicate a variation of a <code>UnitFormat</code>.
-107 * @return the corresponding unit format.
-108 */
-109 UnitFormat getUnitFormat(String name, String variant);
-110
-111 /**
-112 * Gets a list with available format names of a given type for this format service.
-113 *
-114 * @param type
-115 * the {@link FormatType}
-116 * @return list of available formats, never null.
-117 */
-118 Set<String> getAvailableFormatNames(FormatType type);
-119}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.spi;
-031
-032import javax.measure.Quantity;
-033import javax.measure.Quantity.Scale;
-034import javax.measure.Unit;
-035
-036/**
-037 * Represents a factory that accepts {@link Number} and {@link Unit} arguments to create {@link Quantity} results.
-038 *
-039 * @param <Q>
-040 * the type of the {@link Quantity} result
-041 *
-042 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-043 * @author <a href="mailto:otaviopolianasantana@gmail.com">Otavio Santana</a>
-044 * @version 1.4, December 18, 2018
-045 * @since 1.0
-046 *
-047 * @see <a href="https://en.wikipedia.org/wiki/Factory_method_pattern"> Wikipedia: Factory method pattern</a>
-048 * @see Quantity
-049 * @see Unit
-050 */
-051public interface QuantityFactory<Q extends Quantity<Q>> {
-052
-053 /**
-054 * Returns the quantity for the specified number stated in the specified unit and scale.
-055 *
-056 * @param value
-057 * the numeric value stated in the specified unit
-058 * @param unit
-059 * the unit
-060 * @param scale
-061 * The {@code ABSOLUTE} / {@code RELATIVE} {@code scale} of this quantity
-062 * @return the corresponding quantity
-063 * @since 2.0
-064 */
-065 Quantity<Q> create(Number value, Unit<Q> unit, Scale scale);
-066
-067 /**
-068 * Returns the quantity for the specified number stated in the specified unit.
-069 *
-070 * @param value
-071 * the numeric value stated in the specified unit
-072 * @param unit
-073 * the unit
-074 * @return the corresponding quantity
-075 */
-076 Quantity<Q> create(Number value, Unit<Q> unit);
-077
-078 /**
-079 * Returns the system unit for quantities produced by this factory or {@code null} if unknown.
-080 *
-081 * <p>
-082 * Because the system unit is unique by quantity type, it can be be used to identify the quantity given the unit. For example:
-083 * </p>
-084 *
-085 * <pre>
-086 * static boolean isAngularSpeed({@literal Unit<?>} unit) {
-087 * return unit.getSystemUnit().equals(RADIAN.divide(SECOND));
-088 * }
-089 * assert isAngularSpeed(REVOLUTION.divide(MINUTE)); // Returns true.
-090 * </pre>
-091 *
-092 * @return the system unit for this factory.
-093 * @see Unit#getSystemUnit()
-094 */
-095 Unit<Q> getSystemUnit();
-096}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.spi;
-031
-032import java.lang.annotation.Annotation;
-033import java.lang.reflect.InvocationTargetException;
-034import java.lang.reflect.Method;
-035import java.util.ArrayList;
-036import java.util.Comparator;
-037import java.util.List;
-038import java.util.Objects;
-039import java.util.Optional;
-040import java.util.ServiceConfigurationError;
-041import java.util.ServiceLoader;
-042import java.util.concurrent.atomic.AtomicReference;
-043import java.util.function.Predicate;
-044import java.util.logging.Level;
-045import java.util.logging.Logger;
-046import java.util.stream.Collectors;
-047import java.util.stream.Stream;
-048import java.util.stream.StreamSupport;
-049import javax.measure.Quantity;
-050import javax.measure.format.QuantityFormat;
-051import javax.measure.format.UnitFormat;
-052
-053/**
-054 * Service Provider for Units of Measurement services.
-055 * <p>
-056 * All the methods in this class are safe to use by multiple concurrent threads.
-057 * </p>
-058 *
-059 * @version 2.3, May 19, 2023
-060 * @author Werner Keil
-061 * @author Martin Desruisseaux
-062 * @since 1.0
-063 */
-064public abstract class ServiceProvider {
-065 /**
-066 * Class name of JSR-330 annotation for naming a service provider.
-067 * We use reflection for keeping JSR-330 an optional dependency.
-068 */
-069 private static final String LEGACY_NAMED_ANNOTATION = "javax.inject.Named";
-070
-071 /**
-072 * Class name of JSR-250 annotation for assigning a priority level to a service provider.
-073 * We use reflection for keeping JSR-250 an optional dependency.
-074 */
-075 private static final String LEGACY_PRIORITY_ANNOTATION = "javax.annotation.Priority";
-076
-077 /**
-078 * Class name of Jakarta Dependency Injection annotation for naming a service provider.
-079 * We use reflection for keeping Jakata Injection an optional dependency.
-080 */
-081 private static final String NAMED_ANNOTATION = "jakarta.inject.Named";
-082
-083 /**
-084 * Class name of Jakarta Common Annotation for assigning a priority level to a service provider.
-085 * We use reflection for keeping Jakarta Annotations an optional dependency.
-086 */
-087 private static final String PRIORITY_ANNOTATION = "jakarta.annotation.Priority";
-088
-089 /**
-090 * The current service provider, or {@code null} if not yet determined.
-091 *
-092 * <p>Implementation Note: We do not cache a list of all service providers because that list depends
-093 * indirectly on the thread invoking the {@link #available()} method. More specifically, it depends
-094 * on the context class loader. Furthermore caching the {@code ServiceProvider}s can be a source of
-095 * memory leaks. See {@link ServiceLoader#load(Class)} API note for reference.</p>
-096 */
-097 private static final AtomicReference<ServiceProvider> current = new AtomicReference<>();
-098
-099 /**
-100 * Creates a new service provider. Only to be used by subclasses.
-101 */
-102 protected ServiceProvider() {
-103 }
-104
-105 /**
-106 * Allows to define a priority for a registered {@code ServiceProvider} instance.
-107 * When multiple providers are registered in the system, the provider with the highest priority value is taken.
-108 *
-109 * <p>If the {@value #PRIORITY_ANNOTATION} annotation (from Jakarta Annotations)
-110 * or {@value #LEGACY_PRIORITY_ANNOTATION} annotation (from JSR-250) is present on the {@code ServiceProvider}
-111 * implementation class, then that annotation (first if both were present) is taken and this {@code getPriority()} method is ignored.
-112 * Otherwise – if a {@code Priority} annotation is absent – this method is used as a fallback.</p>
-113 *
-114 * @return the provider's priority (default is 0).
-115 */
-116 public int getPriority() {
-117 return 0;
-118 }
-119
-120 /**
-121 * Returns the service to obtain a {@link SystemOfUnits}, or {@code null} if none.
-122 *
-123 * @return the service to obtain a {@link SystemOfUnits}, or {@code null}.
-124 */
-125 public abstract SystemOfUnitsService getSystemOfUnitsService();
-126
-127 /**
-128 * Returns the service to obtain {@link UnitFormat} and {@link QuantityFormat} or {@code null} if none.
-129 *
-130 * @return the service to obtain a {@link UnitFormat} and {@link QuantityFormat}, or {@code null}.
-131 * @since 2.0
-132 */
-133 public abstract FormatService getFormatService();
-134
-135 /**
-136 * Returns a factory for the given {@link Quantity} type.
-137 *
-138 * @param <Q>
-139 * the type of the {@link Quantity} instances created by the factory
-140 * @param quantity
-141 * the quantity type
-142 * @return the {@link QuantityFactory} for the given type
-143 */
-144 public abstract <Q extends Quantity<Q>> QuantityFactory<Q> getQuantityFactory(Class<Q> quantity);
-145
-146 /**
-147 * A filter and a comparator for processing the stream of service providers.
-148 * The two tasks (filtering and sorting) are implemented by the same class,
-149 * but the filter task shall be used only if the name to search is non-null.
-150 * The comparator is used in all cases, for sorting providers with higher priority first.
-151 */
-152 private static final class Selector implements Predicate<ServiceProvider>, Comparator<ServiceProvider> {
-153 /**
-154 * The name of the provider to search, or {@code null} if no filtering by name is applied.
-155 */
-156 private final String toSearch;
-157
-158 /**
-159 * The {@code value()} method in the {@value #NAMED_ANNOTATION} annotation,
-160 * or {@code null} if that class is not on the classpath.
-161 */
-162 private final Method nameGetter;
-163
-164 /**
-165 * The {@code value()} method in the {@value #PRIORITY_ANNOTATION} annotation,
-166 * or {@code null} if that class is not on the classpath.
-167 */
-168 private final Method priorityGetter;
-169
-170 /**
-171 * The {@code value()} method in the {@value #LEGACY_NAMED_ANNOTATION} annotation,
-172 * or {@code null} if that class is not on the classpath.
-173 */
-174 private final Method legacyNameGetter;
-175
-176 /**
-177 * The {@code value()} method in the {@value #LEGACY_PRIORITY_ANNOTATION} annotation,
-178 * or {@code null} if that class is not on the classpath.
-179 */
-180 private final Method legacyPriorityGetter;
-181
-182 /**
-183 * Creates a new filter and comparator for a stream of service providers.
-184 *
-185 * @param name name of the desired service provider, or {@code null} if no filtering by name is applied.
-186 */
-187 Selector(String name) {
-188 toSearch = name;
-189 try {
-190 if (name != null) {
-191 nameGetter = getValueMethod(NAMED_ANNOTATION);
-192 legacyNameGetter = getValueMethod(LEGACY_NAMED_ANNOTATION);
-193 } else {
-194 nameGetter = null;
-195 legacyNameGetter = null;
-196 }
-197 priorityGetter = getValueMethod(PRIORITY_ANNOTATION);
-198 legacyPriorityGetter = getValueMethod(LEGACY_PRIORITY_ANNOTATION);
-199 } catch (NoSuchMethodException e) {
-200 // Should never happen since value() is a standard public method of those annotations.
-201 throw new ServiceConfigurationError("Cannot get annotation value", e);
-202 }
-203 }
-204
-205 /**
-206 * Returns the {@code value()} method in the given annotation class.
-207 *
-208 * @param classname name of the class from which to get the {@code value()} method.
-209 * @return the {@code value()} method, or {@code null} if the annotation class was not found.
-210 */
-211 private static Method getValueMethod(final String classname) throws NoSuchMethodException {
-212 try {
-213 return Class.forName(classname).getMethod("value", (Class[]) null);
-214 } catch (ClassNotFoundException e) {
-215 // Ignore because JSR-330, JSR-250 and Jakarta are optional dependencies.
-216 return null;
-217 }
-218 }
-219
-220 /**
-221 * Invokes the {@code value()} method on the annotation of the given class.
-222 * The annotation on which to invoke the method is given by {@link Method#getDeclaringClass()}.
-223 *
-224 * @param provider class of the provider on which to invoke annotation {@code value()}.
-225 * @param getter the preferred {@code value()} method to invoke, or {@code null}.
-226 * @param fallback an alternative {@code value()} method to invoke, or {@code null}.
-227 * @return the value, or {@code null} if none.
-228 */
-229 private static Object getValue(final Class<?> provider, Method getter, Method fallback) {
-230 if (getter == null) {
-231 getter = fallback;
-232 fallback = null;
-233 }
-234 while (getter != null) {
-235 final Annotation a = provider.getAnnotation(getter.getDeclaringClass().asSubclass(Annotation.class));
-236 if (a != null) try {
-237 return getter.invoke(a, (Object[]) null);
-238 } catch (IllegalAccessException | InvocationTargetException e) {
-239 // Should never happen since value() is a public method and should not throw exception.
-240 throw new ServiceConfigurationError("Cannot get annotation value", e);
-241 }
-242 getter = fallback;
-243 fallback = null;
-244 }
-245 return null;
-246 }
-247
-248 /**
-249 * Returns {@code true} if the given service provider has the name we are looking for.
-250 * This method shall be invoked only if a non-null name has been specified to the constructor.
-251 * This method looks for the {@value #NAMED_ANNOTATION} and {@value #LEGACY_NAMED_ANNOTATION}
-252 * annotations in that order, and if none are found fallbacks on {@link ServiceProvider#toString()}.
-253 */
-254 @Override
-255 public boolean test(final ServiceProvider provider) {
-256 Object value = getValue(provider.getClass(), nameGetter, legacyNameGetter);
-257 if (value == null) {
-258 value = provider.toString();
-259 }
-260 return toSearch.equals(value);
-261 }
-262
-263 /**
-264 * Returns the priority of the given service provider.
-265 * This method looks for the {@value #PRIORITY_ANNOTATION} and {@value #LEGACY_PRIORITY_ANNOTATION}
-266 * annotations in that order, and if none are found falls back on {@link ServiceProvider#getPriority()}.
-267 */
-268 private int priority(final ServiceProvider provider) {
-269 Object value = getValue(provider.getClass(), priorityGetter, legacyPriorityGetter);
-270 if (value != null) {
-271 return (Integer) value;
-272 }
-273 return provider.getPriority();
-274 }
-275
-276 /**
-277 * Compares the given service providers for order based on their priority.
-278 * The priority of each provider is determined as documented by {@link ServiceProvider#getPriority()}.
-279 */
-280 @Override
-281 public int compare(final ServiceProvider p1, final ServiceProvider p2) {
-282 return Integer.compare(priority(p2), priority(p1)); // reverse order, higher number first.
-283 }
-284
-285 /**
-286 * Gets all {@link ServiceProvider}s sorted by priority and optionally filtered by the name in this selector.
-287 * The list of service providers is <strong>not</strong> cached because it depends on the context class loader,
-288 * which itself depends on which thread is invoking this method.
-289 */
-290 private Stream<ServiceProvider> stream() {
-291 Stream<ServiceProvider> stream = StreamSupport.stream(ServiceLoader.load(ServiceProvider.class).spliterator(), false);
-292 if (toSearch != null) {
-293 stream = stream.filter(this);
-294 }
-295 return stream.sorted(this);
-296 }
-297 }
-298
-299 /**
-300 * Returns the list of all service providers available for the current thread's context class loader.
-301 * The {@linkplain #current() current} service provider is always the first item in the returned list.
-302 * Other service providers after the first item may depend on the caller thread
-303 * (see {@linkplain ServiceLoader#load(Class) service loader API note}).
-304 *
-305 * @return all service providers available for the current thread's context class loader.
-306 */
-307 public static final List<ServiceProvider> available() {
-308 ArrayList<ServiceProvider> providers = new Selector(null).stream().collect(Collectors.toCollection(ArrayList::new));
-309 final ServiceProvider first = current.get();
-310 /*
-311 * Make sure that 'first' is the first item in the 'providers' list. If that item appears
-312 * somewhere else, we have to remove the second occurrence for avoiding duplicated elements.
-313 * We compare the classes, not the instances, because new instances may be created each time
-314 * this method is invoked and we have no guaranteed that implementors overrode 'equals'.
-315 */
-316setcur: if (first != null) {
-317 final Class<?> cf = first.getClass();
-318 final int size = providers.size();
-319 for (int i=0; i<size; i++) {
-320 if (cf.equals(providers.get(i).getClass())) {
-321 if (i == 0) break setcur; // No change needed (note: labeled breaks on if statements are legal).
-322 providers.remove(i);
-323 break;
-324 }
-325 }
-326 providers.add(0, first);
-327 }
-328 return providers;
-329 }
-330
-331 /**
-332 * Returns the {@link ServiceProvider} with the specified name.
-333 * The given name must match the name of at least one service provider available in the current thread's
-334 * context class loader.
-335 * The service provider names are the values of {@value #NAMED_ANNOTATION} (from Jakarta Annotations) or
-336 * {@value #LEGACY_NAMED_ANNOTATION} (from JSR-330) annotations when present (first if both were present),
-337 * or the value of {@link #toString()} method for providers without {@code Named} annotation.
-338 *
-339 * <p>Implementors are encouraged to provide an {@code Named} annotation or to override {@link #toString()}
-340 * and use a unique enough name, e.g. the class name or other distinct attributes.
-341 * Should multiple service providers nevertheless use the same name, the one with the highest
-342 * {@linkplain #getPriority() priority} wins.</p>
-343 *
-344 * @param name
-345 * the name of the service provider to return
-346 * @return the {@link ServiceProvider} with the specified name
-347 * @throws IllegalArgumentException
-348 * if available service providers do not contain a provider with the specified name
-349 * @throws NullPointerException
-350 * if {@code name} is null
-351 * @see #toString()
-352 * @since 2.0
-353 */
-354 public static ServiceProvider of(String name) {
-355 Objects.requireNonNull(name);
-356 Selector select = new Selector(name);
-357 ServiceProvider p = current.get();
-358 if (p != null && select.test(p)) {
-359 return p;
-360 }
-361 Optional<ServiceProvider> first = select.stream().findFirst();
-362 if (first.isPresent()) {
-363 return first.get();
-364 } else {
-365 throw new IllegalArgumentException("No Measurement ServiceProvider " + name + " found .");
-366 }
-367 }
-368
-369 /**
-370 * Returns the current {@link ServiceProvider}. If necessary the {@link ServiceProvider} will be lazily loaded.
-371 * <p>
-372 * If there are no providers available, an {@linkplain IllegalStateException} is thrown.
-373 * Otherwise the provider with the highest priority is used
-374 * or the one explicitly designated via {@link #setCurrent(ServiceProvider)}.
-375 * </p>
-376 *
-377 * @return the {@link ServiceProvider} used.
-378 * @throws IllegalStateException
-379 * if no {@link ServiceProvider} has been found.
-380 * @see #getPriority()
-381 * @see #setCurrent(ServiceProvider)
-382 */
-383 public static final ServiceProvider current() {
-384 ServiceProvider p = current.get();
-385 if (p == null) {
-386 Optional<ServiceProvider> first = new Selector(null).stream().findFirst();
-387 if (first.isPresent()) {
-388 p = first.get();
-389 } else {
-390 throw new IllegalStateException("No Measurement ServiceProvider found.");
-391 }
-392 }
-393 return p;
-394 }
-395
-396 /**
-397 * Replaces the current {@link ServiceProvider}.
-398 *
-399 * @param provider
-400 * the new {@link ServiceProvider}
-401 * @return the replaced provider, or null.
-402 */
-403 public static final ServiceProvider setCurrent(ServiceProvider provider) {
-404 Objects.requireNonNull(provider);
-405 ServiceProvider old = current.getAndSet(provider);
-406 if (old != provider) {
-407 Logger.getLogger("javax.measure.spi").log(Level.CONFIG,
-408 "Measurement ServiceProvider {1,choice,0#set to|1#replaced by} {0}.",
-409 new Object[] {provider.getClass().getName(), (old == null) ? 0 : 1});
-410 }
-411 return old;
-412 }
-413}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.spi;
-031
-032import java.util.Set;
-033
-034import javax.measure.Dimension;
-035import javax.measure.Quantity;
-036import javax.measure.Unit;
-037
-038/**
-039 * A system of units grouped together for historical or cultural reasons.<br>
-040 * Common system of units are "SI" (System International), "Imperial" (British), "US" (US Customary). Nothing prevents a unit from belonging to
-041 * several systems of units at the same time (for example an {@code Imperial} system would have many of the units held by the {@code US} Customary
-042 * system).
-043 *
-044 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-045 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-046 * @version 1.1, June 21, 2018
-047 * @since 1.0
-048 *
-049 * @see <a href="http://en.wikipedia.org/wiki/International_System_of_Units"> Wikipedia: International System of Units</a>
-050 * @see <a href="http://en.wikipedia.org/wiki/Systems_of_measurement"> Wikipedia: System of measurement</a>
-051 */
-052public interface SystemOfUnits {
-053
-054 /**
-055 * @return a name
-056 */
-057 String getName();
-058
-059 /**
-060 * Returns the default unit for the specified quantity or {@code null} if none is defined for the given quantity in this unit system.
-061 *
-062 * @param <Q>
-063 * the compile-time quantity type.
-064 * @param quantityType
-065 * the quantity type.
-066 * @return the unit for the specified quantity.
-067 */
-068 <Q extends Quantity<Q>> Unit<Q> getUnit(Class<Q> quantityType);
-069
-070 /**
-071 * Returns a unit with the given {@linkplain String string} representation or {@code null} if none is found in this unit system.
-072 *
-073 * @param string
-074 * the string representation of a unit, not {@code null}.
-075 * @return the unit with the given string representation.
-076 * @since 2.0
-077 */
-078 Unit<?> getUnit(String string);
-079
-080 /**
-081 * Returns a read only view over the units explicitly defined by this system. This include the base and derived units which are assigned a special
-082 * name and symbol. This set does not include new units created by arithmetic or other operations.
-083 *
-084 * @return the defined collection of units.
-085 */
-086 Set<? extends Unit<?>> getUnits();
-087
-088 /**
-089 * Returns the units defined in this system having the specified dimension (convenience method).
-090 *
-091 * @param dimension
-092 * the dimension of the units to be returned.
-093 * @return the collection of units of specified dimension.
-094 */
-095 Set<? extends Unit<?>> getUnits(Dimension dimension);
-096}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
001/*
-002 * Units of Measurement API
-003 * Copyright (c) 2014-2023, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
-004 *
-005 * All rights reserved.
-006 *
-007 * Redistribution and use in source and binary forms, with or without modification,
-008 * are permitted provided that the following conditions are met:
-009 *
-010 * 1. Redistributions of source code must retain the above copyright notice,
-011 * this list of conditions and the following disclaimer.
-012 *
-013 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-014 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
-015 *
-016 * 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
-017 * derived from this software without specific prior written permission.
-018 *
-019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-023 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-026 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-029 */
-030package javax.measure.spi;
-031
-032import java.util.Collection;
-033import java.util.EnumSet;
-034import java.util.Set;
-035import javax.measure.Prefix;
-036
-037/**
-038 * This interface represents the service to obtain a {@link SystemOfUnits system
-039 * of units}.
-040 *
-041 * <p>
-042 * Common systems of units are "SI" (System International) or Metric system,
-043 * "Imperial" (British), or "US" (US Customary).
-044 * </p>
-045 *
-046 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
-047 * @author <a href="mailto:werner@uom.technology">Werner Keil</a>
-048 * @author <a href="mailto:martin.desruisseaux@geomatys.com">Martin
-049 * Desruisseaux</a>
-050 * @version 1.8, April 3, 2023
-051 * @since 1.0
-052 *
-053 * @see <a href=
-054 * "https://en.wikipedia.org/wiki/International_System_of_Units">Wikipedia:
-055 * International System of Units</a>
-056 */
-057public interface SystemOfUnitsService {
-058
-059 /**
-060 * Returns the default {@link SystemOfUnits system of units}. Depending on the
-061 * implementation this may be the <a href="https://en.wikipedia.org/wiki/International_System_of_Units">International
-062 * System of Units</a> or another default system.
-063 *
-064 * @return the default system of units.
-065 */
-066 SystemOfUnits getSystemOfUnits();
-067
-068 /**
-069 * Returns the system of units having the specified name or {@code null} if
-070 * none is found.
-071 *
-072 * @param name the system of unit name.
-073 * @return the system of units for the given name.
-074 */
-075 SystemOfUnits getSystemOfUnits(String name);
-076
-077 /**
-078 * Gets a list with available systems for this {@link SystemOfUnitsService}.
-079 *
-080 * @return list of available systems of units, never null.
-081 */
-082 Collection<SystemOfUnits> getAvailableSystemsOfUnits();
-083
-084 /**
-085 * Returns a {@link Set} containing the values of a particular {@link Prefix}
-086 * type.
-087 *
-088 * <p>
-089 * This method may be used to iterate over certain prefixes as follows:
-090 * </p>
-091 * <pre>{@code
-092 * for(MetricPrefix mp : service.getPrefixes(MetricPrefix.class))
-093 * System.out.println(p);
-094 * }</pre>
-095 *
-096 * The default implementation assumes that prefixes of the given type are implemented as an enumeration.
-097 * This is the case of the two default prefix implementations provided in JSR 385,
-098 * namely {@link javax.measure.MetricPrefix} and {@link javax.measure.BinaryPrefix}.
-099 * Implementors shall override this method if they provide prefixes implemented in a different way.
-100 *
-101 * @param <P> compile-time value of the {@code prefixType} argument
-102 * @param prefixType the {@link Prefix} type
-103 * @return a set containing the constant values of this Prefix type, in the
-104 * order they're declared
-105 * @throws ClassCastException if the class is not compatible with the desired
-106 * Prefix implementation or does not implement Prefix at all.
-107 * @since 2.0
-108 */
-109 @SuppressWarnings({"unchecked", "rawtypes"})
-110 default <P extends Prefix> Set<P> getPrefixes(Class<P> prefixType) {
-111 // Following check is redundant with parameterized type but nevertheless applied as a safety.
-112 if (Prefix.class.isAssignableFrom(prefixType)) {
-113 EnumSet<? extends Enum<?>> prefixes = EnumSet.allOf(prefixType.asSubclass(Enum.class));
-114 /*
-115 * Following unchecked cast is safe for read operations because the given class implements
-116 * 'prefixType' in addition of being an enumeration. It is also safe for write operations
-117 * because all enumerations are closed universes (so users can not add an instance unknown
-118 * to EnumSet) and we would have got an exception before this point if 'prefixType' was not
-119 * an enumeration in the sense of Class.isEnum().
-120 */
-121 return (EnumSet) prefixes;
-122 } else {
-123 throw new ClassCastException(String.format("%s does not implement Prefix", prefixType));
-124 // TODO or should we throw a different exception here, MeasurementException or IllegalArgumentException?
-125 }
-126 }
-127}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The Unit of Measurement API provides a set of Java language programming interfaces for handling units and quantities. The interfaces provide a layer which separates client code, that would call the API, from library code, which implements the API.
-
-
The specification contains Interfaces and abstract classes with methods for unit operations: * Checking of unit compatibility * Expression of a quantity in various units * Arithmetic operations on units
- The JSR is lead by Jean-Marie Dautelle (@dautelle),
- Werner Keil (@keilw) and Otavio Santana (@otaviojava).
- You can access the API by adding the following Maven
- dependencies:
-
-Release artifacts are accessible from the following repositories:
-
-
Maven Central
-
-
-
-
Though it is possible to only reference the API from your application, you should also add an implementation like the Indriya reference implementation.
-On the other hand you may leave the API out if you already declare Indriya, especially using the JPMS (Jigsaw) since the implementation also declares Unit-API as a "transitive" dependency.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/site/apidocs/allclasses-index.html b/docs/site/apidocs/allclasses-index.html
deleted file mode 100644
index 0dbf07fb..00000000
--- a/docs/site/apidocs/allclasses-index.html
+++ /dev/null
@@ -1,294 +0,0 @@
-
-
-
-
-All Classes and Interfaces (Units of Measurement API 2.2.1-SNAPSHOT API)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
A system of units grouped together for historical or cultural reasons.
- Common system of units are "SI" (System International), "Imperial" (British), "US" (US Customary).
-Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces
-
-
Search
-
You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
-
-
j.l.obj will match "java.lang.Object"
-
InpStr will match "java.io.InputStream"
-
HM.cK will match "java.util.HashMap.containsKey(Object)"
-The following sections describe the different kinds of pages in this collection.
-
-
Overview
-
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
-
-
-
Package
-
Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
-
-
Interfaces
-
Classes
-
Enums
-
Exceptions
-
Errors
-
Annotation Types
-
-
-
-
Class or Interface
-
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
-
-
Class Inheritance Diagram
-
Direct Subclasses
-
All Known Subinterfaces
-
All Known Implementing Classes
-
Class or Interface Declaration
-
Class or Interface Description
-
-
-
-
Nested Class Summary
-
Enum Constant Summary
-
Field Summary
-
Property Summary
-
Constructor Summary
-
Method Summary
-
Required Element Summary
-
Optional Element Summary
-
-
-
-
Enum Constant Details
-
Field Details
-
Property Details
-
Constructor Details
-
Method Details
-
Element Details
-
-
Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
-
The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
-
-
-
Other Files
-
Packages and modules may contain pages with additional information related to the declarations nearby.
-
-
-
Use
-
Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
-
-
-
Tree (Class Hierarchy)
-
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.
-
-
When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
-
When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
-
-
-
-
Serialized Form
-
Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.
-
-
-
All Packages
-
The All Packages page contains an alphabetic index of all packages contained in the documentation.
-
-
-
All Classes and Interfaces
-
The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
-
-
-
Index
-
The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
-
-
-
-This help file applies to API documentation generated by the standard doclet.
-
-
Returns a system unit equivalent to this unscaled standard unit but used in expressions to distinguish between quantities of a different nature
- but of the same dimensions.
Casts this quantity to a parameterized unit of specified nature or throw a
- ClassCastException if the dimension of the specified quantity
- and this measure unit's dimension do not match.
Casts this unit to a parameterized unit of specified nature or throw a ClassCastException if the dimension of the specified quantity and
- this unit's dimension do not match.
Returns a Quantity that is the multiplicative inverse of this
- Quantity, having reciprocal value and reciprocal unit as given by
- this.getUnit().inverse().
Indicates whether this converter represents a (one-dimensional) linear transformation, that is
- a linear map (wikipedia) from a one-dimensional
- vector space (a scalar) to a one-dimensional vector space.
A system of units grouped together for historical or cultural reasons.
- Common system of units are "SI" (System International), "Imperial" (British), "US" (US Customary).
Returns the enum constant of this type with the specified name.
-The string must match exactly an identifier used to declare an
-enum constant in this type. (Extraneous whitespace characters are
-not permitted.)
-
-
Parameters:
-
name - the name of the enum constant to be returned.
Signals that a problem of some sort has occurred due to incommensurable of some quantities/units. Only commensurable quantity (quantities with the
- same dimensions) may be compared, equated, added, or subtracted. Also, one unit can be converted to another unit only if both units are
- commensurable.
-
- This is a checked exception, so it deliberately doesn't inherit from MeasurementException like most other exceptions.
-
Returns the enum constant of this type with the specified name.
-The string must match exactly an identifier used to declare an
-enum constant in this type. (Extraneous whitespace characters are
-not permitted.)
-
-
Parameters:
-
name - the name of the enum constant to be returned.
Returns the value of this prefix. If the exponent is different from 1, this value is the base part of the associated
- factor in base^exponent representation.
Exponent part of the associated factor in base^exponent representation. For different factors, e.g. rational numbers like 1/4
- the exponent is always 1.
Returns the enum constant of this type with the specified name.
-The string must match exactly an identifier used to declare an
-enum constant in this type. (Extraneous whitespace characters are
-not permitted.)
-
-
Parameters:
-
name - the name of the enum constant to be returned.
Represents a quantitative property of a phenomenon, body, or substance, that
- can be quantified by measurement. Mass,
- time, distance, heat, and angular separation are among the familiar examples
- of quantitative properties.
-
- This interface defines some arithmetic operations between Quantity
- instances. All implementations shall produce equivalent results for
- the same operation applied on equivalent quantities. Two quantities are
- equivalent if, after conversion to the same unit of measurement, they have
- the same numerical value (ignoring rounding errors). For example 2000 metres
- is equivalent to 2 km, but 2°C is not equivalent to 2 K; it is equivalent to
- 275.15 K instead. Above requirement applied to addition means that 2°C + 2 K
- shall be equivalent to 275.15 K + 2 K.
-
-
All operations shall preserve the
- basic laws
- of algebra, in particular commutativity of addition and
- multiplication (A + B = B + A)
- and associativity of addition and multiplication (A +
- B) + C = A + (B + C).
- In order to preserve those algebra laws, this specification requires all
- arithmetic operations to execute as is all operands were converted
- to system unit before the operation is
- carried out, and the result converted back to any compatible unit at
- implementation choice. For example 4 cm + 1 inch shall produce any result
- equivalent to 0.04 m + 0.0254 m.
-
-
Implementations are allowed to avoid conversion to system unit if the
- result is guaranteed to be equivalent. This is often the case when the
- conversion between quantity unit and system unit is only a
- scale factor. However this is not
- the case for conversions applying an offset or more complex formula.
- For example 2°C + 1°C = 274.15°C, not 3°C. This counter-intuitive result
- is essential for preserving algebra laws like associativity, and is also
- the expected result from a thermodynamic point of view.
-
-
-
API Note:
This interface places no restrictions on the mutability of
- implementations, however immutability is strongly recommended. All
- implementations must be Comparable.
Casts this quantity to a parameterized unit of specified nature or throw a
- ClassCastException if the dimension of the specified quantity
- and this measure unit's dimension do not match.
Returns a Quantity that is the multiplicative inverse of this
- Quantity, having reciprocal value and reciprocal unit as given by
- this.getUnit().inverse().
Returns the sum of this Quantity with the one specified.
- The result shall be as if this quantity and the given addend were
- converted to system unit before
- to be added, and the result converted back to the unit of this
- quantity or any other compatible unit at implementation choice.
Returns the difference between this Quantity and the one specified.
- The result shall be as if this quantity and the given subtrahend were
- converted to system unit before
- to be subtracted, and the result converted back to the unit of this
- quantity or any other compatible unit at implementation choice.
Returns the quotient of this Quantity divided by the Quantity
- specified.
- The result shall be as if this quantity and the given divisor were
- converted to system unit before
- to be divided, and the result converted back to the unit of this
- quantity or any other compatible unit at implementation choice.
-
-
Parameters:
-
divisor - the Quantity divisor.
-
Returns:
-
this / divisor.
-
Throws:
-
ClassCastException - if the type of an element in the specified operation is
- incompatible with this quantity
Returns the quotient of this Quantity divided by the Number
- specified.
- The result shall be as if this quantity was converted to
- system unit before to be divided,
- and the result converted back to the unit of this quantity or any
- other compatible unit at implementation choice.
Returns the product of this Quantity with the one specified.
- The result shall be as if this quantity and the given multiplicand were
- converted to system unit before
- to be multiplied, and the result converted back to the unit of this
- quantity or any other compatible unit at implementation choice.
-
-
Parameters:
-
multiplicand - the Quantity multiplicand.
-
Returns:
-
this * multiplicand.
-
Throws:
-
ClassCastException - if the type of an element in the specified operation is
- incompatible with this quantity
Returns the product of this Quantity with the Number value
- specified.
- The result shall be as if this quantity was converted to
- system unit before to be multiplied,
- and the result converted back to the unit of this quantity or any
- other compatible unit at implementation choice.
Returns a Quantity that is the multiplicative inverse of this
- Quantity, having reciprocal value and reciprocal unit as given by
- this.getUnit().inverse().
Casts this quantity to a parameterized unit of specified nature or throw a
- ClassCastException if the dimension of the specified quantity
- and this measure unit's dimension do not match. For example:
-
-
- Quantity<Length> length = Quantities.getQuantity("2 km").asType(Length.class);
- or
- Quantity<Speed> C = length.multiply(299792458).divide(second).asType(Speed.class);
-
-
-
-
Type Parameters:
-
T - The type of the quantity.
-
Parameters:
-
type - the quantity class identifying the nature of the quantity.
-
Returns:
-
this quantity parameterized with the specified type.
-
Throws:
-
ClassCastException - if the dimension of this unit is different from the specified
- quantity dimension.
Signals that a problem of some sort has occurred due to the impossibility of constructing a converter between two units. For example, the
- multiplication of offset units are usually units not convertible to their system unit.
Represents a determinate quantity (as of length, time, heat, or value) adopted as a standard of measurement.
-
-
- It is helpful to think of instances of this class as recording the history by which they are created. Thus, for example, the string "g/kg"
- (which is a dimensionless unit) would result from invoking the method toString() on a unit that was created by dividing a gram unit by a
- kilogram unit.
-
-
-
- This interface supports the multiplication of offsets units. The result is usually a unit not convertible to its system unit. Such units may appear in derivative quantities. For example Celsius per meter is an unit of gradient, which is common in atmospheric
- and oceanographic research.
-
-
-
- Units raised at non-integral powers are not supported. For example, LITRE.root(2) raises an ArithmeticException, but
- HECTARE.root(2) returns HECTOMETRE (100 metres).
-
Returns a system unit equivalent to this unscaled standard unit but used in expressions to distinguish between quantities of a different nature
- but of the same dimensions.
Casts this unit to a parameterized unit of specified nature or throw a ClassCastException if the dimension of the specified quantity and
- this unit's dimension do not match.
Returns the unscaled system unit from which this unit is derived. System units are either base units, alternate
- units or product of rational powers of system units.
-
-
- Because the system unit is unique by quantity type, it can be be used to identify the quantity given the unit. For example:
-
Indicates if this unit is compatible with the unit specified. Units don't need to be equal to be compatible. For example (assuming ONE
- is a dimensionless unit):
-
-
- RADIAN.equals(ONE) == false
- RADIAN.isCompatible(ONE) == true
- RADIAN.isEquivalentTo(ONE) doesn't compile
-
-
-
Parameters:
-
that - the other unit to compare for compatibility.
Indicates if this unit represents the same quantity than the given unit, ignoring name and symbols.
- Two units are equivalent if the conversion between them is identity.
-
-
- Unlike isCompatible(Unit) an equivalence check requires both units to be strictly type-compatible,
- because it makes no sense to compare e.g. gram and mm for equivalence.
- By contrast, the compatibility check can works across different quantity types.
-
-
-
Parameters:
-
that - the Unit<Q> to be compared with this instance.
Casts this unit to a parameterized unit of specified nature or throw a ClassCastException if the dimension of the specified quantity and
- this unit's dimension do not match. For example:
-
-
- Unit<Speed> C = METRE.multiply(299792458).divide(SECOND).asType(Speed.class);
-
-
-
Type Parameters:
-
T - The type of the quantity measured by the unit.
-
Parameters:
-
type - the quantity class identifying the nature of the unit.
-
Returns:
-
this unit parameterized with the specified type.
-
Throws:
-
ClassCastException - if the dimension of this unit is different from the specified quantity dimension.
Returns a converter of numeric values from this unit to another unit of same type. This method performs the same work as
- getConverterToAny(Unit) without raising checked exception.
-
-
Parameters:
-
that - the unit of same type to which to convert the numeric values.
Returns a converter from this unit to the specified unit of type unknown. This method can be used when the quantity type of the specified unit is
- unknown at compile-time or when dimensional analysis allows for conversion between units of different type.
-
-
- To convert to a unit having the same parameterized type, getConverterTo(Unit) is preferred (no checked exception raised).
-
-
-
Parameters:
-
that - the unit to which to convert the numeric values.
Returns a system unit equivalent to this unscaled standard unit but used in expressions to distinguish between quantities of a different nature
- but of the same dimensions.
-
-
Returns the result of setting the origin of the scale of measurement to the given value. The returned unit is convertible with all units that are
- convertible with this unit. For example the following code:
-
-
- CELSIUS = KELVIN.shift(273.15);
-
-
- creates a new unit where 0°C (the origin of the new unit) is equals to 273.15 K. Converting from the old unit to the new one is equivalent to
- subtracting the offset to the value in the old unit.
-
-
Parameters:
-
offset - the offset added (expressed in this unit).
Returns the result of setting the origin of the scale of measurement to the given value. The returned unit is convertible with all units that are
- convertible with this unit. For example the following code:
-
-
- CELSIUS = KELVIN.shift(273.15);
-
-
- creates a new unit where 0°C (the origin of the new unit) is equals to 273.15 K. Converting from the old unit to the new one is equivalent to
- subtracting the offset to the value in the old unit.
-
-
Parameters:
-
offset - the offset added (expressed in this unit).
Returns the result of multiplying this unit by the specified factor. If the factor is an integer value, the multiplication is exact
- (recommended). For example:
-
-
- FOOT = METRE.multiply(3048).divide(10000); // Exact definition.
- ELECTRON_MASS = KILOGRAM.multiply(9.10938188e-31); // Approximation.
-
Returns the result of multiplying this unit by the specified factor. For example:
-
-
- FOOT = METRE.multiply(3048).divide(10000); // Exact definition.
- ELECTRON_MASS = KILOGRAM.multiply(9.10938188e-31); // Approximation.
-
Returns the result of dividing this unit by a divisor. If the factor is an integer value, the division is exact. For example:
-
-
- GRAM = KILOGRAM.divide(1000); // Exact definition.
-
Returns a string representation of this unit. The string representation may be the unit symbol, or may be some
- representation of product units, multiplication factor and offset if any.
-
-
- The string may be localized at implementation choice by the means of a particular device and platform.
-
Indicates whether this converter represents a (one-dimensional) linear transformation, that is
- a linear map (wikipedia) from a one-dimensional
- vector space (a scalar) to a one-dimensional vector space.
Indicates whether this converter represents a (one-dimensional) linear transformation, that is
- a linear map (wikipedia) from a one-dimensional
- vector space (a scalar) to a one-dimensional vector space. Typically from 'R' to 'R', with 'R' the
- real numbers.
-
-
- Given such a 'linear' converter 'A', let 'u', 'v' and 'r' be arbitrary numbers, then the following
- must hold by definition:
-
-
-
A(u + v) == A(u) + A(v)
-
A(r * u) == r * A(u)
-
-
-
- Given a second 'linear' converter 'B', commutativity of composition follows by above definition:
-
-
-
(A o B) (u) == (B o A) (u)
-
-
- In other words, two 'linear' converters do have the property that A(B(u)) == B(A(u)), meaning
- for 'A' and 'B' the order of their composition does not matter. Expressed as Java code:
-
-
Concatenates this converter with another converter. The resulting converter is equivalent to first converting by the specified converter (right
- converter), and then converting by this converter (left converter).
-
-
Parameters:
-
converter - the other converter to concatenate with this converter.
-
Returns:
-
the concatenation of this converter with the other converter.
- Returns the steps of fundamental converters making up this converter or this if the converter is a fundamental converter.
-
-
- For example, converter1.getConversionSteps() returns converter1 while
- converter1.concatenate(converter2).getConversionSteps() returns converter1, converter2.
-
-
-
Returns:
-
the list of fundamental converters which concatenated make up this converter.
Casts this quantity to a parameterized unit of specified nature or throw a
- ClassCastException if the dimension of the specified quantity
- and this measure unit's dimension do not match.
Casts this unit to a parameterized unit of specified nature or throw a ClassCastException if the dimension of the specified quantity and
- this unit's dimension do not match.
Casts this quantity to a parameterized unit of specified nature or throw a
- ClassCastException if the dimension of the specified quantity
- and this measure unit's dimension do not match.
Returns a Quantity that is the multiplicative inverse of this
- Quantity, having reciprocal value and reciprocal unit as given by
- this.getUnit().inverse().
Returns a system unit equivalent to this unscaled standard unit but used in expressions to distinguish between quantities of a different nature
- but of the same dimensions.
Casts this unit to a parameterized unit of specified nature or throw a ClassCastException if the dimension of the specified quantity and
- this unit's dimension do not match.
Constructs a MeasurementParseException with the specified detail message, parsed text and index. A detail message is a String that describes
- this particular exception.
-
-
Parameters:
-
message - the detail message
-
parsedData - the parsed text, should not be null
-
position - the position where the error was found while parsing.
- Instances of this class are not required to be thread-safe. It is recommended to use separate format instances for each thread. If multiple threads
- access a format concurrently, it must be synchronized externally.
Parses a portion of the specified CharSequence from the specified position to produce a Quantity.
- If parsing succeeds, then the index of the pos argument is updated to the index after the last character used.
-
-
Parameters:
-
csq - the CharSequence to parse.
-
pos - a ParsePosition object holding the current parsing index and error parsing index information as described above.
-
Returns:
-
the quantity parsed from the specified character sub-sequence.
-
Throws:
-
MeasurementParseException - if any problem occurs while parsing the specified character sequence (e.g. illegal syntax).
Parses the specified CharSequence to produce a Quantity.
-
- The parse must complete normally and parse the entire text. If the parse completes without reading the entire length of the text, an exception
- is thrown. If any other problem occurs during parsing, an exception is thrown.
-
-
-
Parameters:
-
csq - the CharSequence to parse.
-
Returns:
-
the quantity parsed from the specified character sub-sequence.
-
Throws:
-
MeasurementParseException - if any problem occurs while parsing the specified character sequence (e.g. illegal syntax).
- Instances of this class are not required to be thread-safe. It is recommended to use separate format instances for each thread. If multiple threads
- access a format concurrently, it must be synchronized externally.
-
Attaches a system-wide label to the specified Unit.
-
- This method overrides the previous unit's label (e.g. label from unit database or unit system) as units may only have one label. Depending on the
- UnitFormat implementation, this call may be ignored if the particular unit already has a label.
-
- If a UnitFormat implementation is explicitly immutable, similar to e.g. the result of Collections.unmodifiableList(),
- then an UnsupportedOperationException may be thrown upon this call.
-
- Since UnitFormat implementations often apply the Singleton pattern, system-wide means, the label applies to every instance of
- UnitFormatA implementing UnitFormat in this case, but not every instance of UnitFormatB or UnitFormatC both
- also implementing UnitFormat. If a UnitFormat #isLocaleSensitive() it is up to the implementation, whether the label is
- ignored, applied in a local-neutral manner (in addition to its local-sensitive information) or locale-specific.
-
-
-
Parameters:
-
unit - the unit being labeled.
-
label - the new label for this unit.
-
Throws:
-
IllegalArgumentException - if the label is not a valid identifier. This may include characters not supported by a particular UnitFormat implementation
- (e.g. only ASCII characters for certain devices)
Parses a portion of the specified CharSequence from the specified position to produce a Unit.
- If parsing succeeds, then the index of the pos argument is updated to the index after the last character used.
-
-
Parameters:
-
csq - the CharSequence to parse.
-
pos - a ParsePosition object holding the current parsing index and error parsing index information as described above.
-
Returns:
-
the unit parsed from the specified character sub-sequence.
-
Throws:
-
MeasurementParseException - if any problem occurs while parsing the specified character sequence (e.g. illegal syntax).
- The parse must complete normally and parse the entire text. If the parse completes without reading the entire length of the text, an exception
- is thrown. If any other problem occurs during parsing, an exception is thrown.
-
-
-
Parameters:
-
csq - the CharSequence to parse.
-
Returns:
-
the unit parsed from the specified character sequence.
-
Throws:
-
MeasurementParseException - if any problem occurs while parsing the specified character sequence (e.g. illegal syntax).
Number of elementary entities (molecules, for example) of a substance. The metric system unit for this quantity is "mol" (mole).
-
- The mole, symbol mol, is the SI unit of amount of substance. One mole contains
- exactly 6.022 140 76 × 10²³ elementary entities. This number is the fixed numerical
- value of the Avogadro constant, NA, when expressed in the unit mol⁻¹ and is called
- the Avogadro number.
-
- The amount of substance, symbol n, of a system is a measure of the number of
- specified elementary entities. An elementary entity may be an atom, a molecule, an
- ion, an electron, any other particle or specified group of particles.
- This definition implies the exact relation Nₐ = 6.022 140 76 × 10²³ mol⁻¹.
-
- Inverting this relation gives an exact expression for the mole in terms of the defining constant NA:
-
- 1 mol = 6.02214076 × 10²³ / Nₐ
-
-
Amount of electric charge flowing past a specified circuit point per unit time. The metric system unit for this quantity is "A" (Ampere).
-
- The ampere, symbol A, is the SI unit of electric current. It is defined by taking the
- fixed numerical value of the elementary charge e to be 1.602 176 634 × 10⁻¹⁹ when
- expressed in the unit C, which is equal to A s, where the second is defined in terms
- of ∆νCs.
-
- This definition implies the exact relation e = 1.602 176 634 × 10⁻¹⁹ A s. Inverting this
- relation gives an exact expression for the unit ampere in terms of the defining constants e
- and ∆νCs:
-
- 1 A = (e / 1.602 176 634 × 10⁻¹⁹) s⁻¹
-
-
Quantity that tends to produce an acceleration of a body in the direction of its application. The metric system unit for this quantity is "N"
- (Newton).
Extent of something along its greatest dimension or the extent of space between two objects or places.
- The metric system unit for this quantity is "m" (metre).
-
- The metre, symbol m, is the SI unit of length. It is defined by taking the fixed
- numerical value of the speed of light in vacuum c to be 299 792 458 when expressed
- in the unit m s⁻¹, where the second is defined in terms of the caesium frequency
- ∆νCs.
-
- This definition implies the exact relation c = 299 792 458 m s⁻¹. Inverting this relation
- gives an exact expression for the metre in terms of the defining constants c and ∆νCs:
-
- 1 m = (c / 299 792 458)s = 9 192 631 770 c / 299 792 458 ∆νCs ≈ 30.663 319 c / ∆νCs
-
-
Luminous flux density per solid angle as measured in a given direction relative to the emitting source.
- The metric system unit for this quantity is "cd" (candela).
-
- The candela, symbol cd, is the SI unit of luminous intensity in a given direction. It is
- defined by taking the fixed numerical value of the luminous efficacy of
- monochromatic radiation of frequency 540 × 10¹² Hz, Kcd, to be 683 when expressed
- in the unit lm W−1, which is equal to cd sr W⁻¹, or cd sr kg⁻¹ m⁻² s³, where the kilogram,
- metre and second are defined in terms of h, c and ∆νCs.
-
- This definition implies the exact relation Kcd = 683 cd sr kg⁻¹ m⁻² s³ for monochromatic
- radiation of frequency ν = 540 × 10¹² Hz. Inverting this relation gives an exact expression
- for the candela in terms of the defining constants Kcd, h and ∆νCs:
-
- 1 cd = (Kcd / 683) kg m² s⁻³ sr⁻¹
-
-
Measure of the quantity of matter that a body or an object contains. The mass of the body is not dependent on gravity and therefore is different
- from but proportional to its weight. The metric system unit for this quantity is "kg" (kilogram).
-
- The kilogram, symbol kg, is the SI unit of mass. It is defined by taking the fixed
- numerical value of the Planck constant h to be 6.626 070 15 × 10⁻³⁴ when expressed
- in the unit J s, which is equal to kg m² s−1, where the metre and the second are
- defined in terms of c and ∆νCs.
-
- This definition implies the exact relation h = 6.626 070 15 × 10−34 kg m² s⁻¹. Inverting this
- relation gives an exact expression for the kilogram in terms of the three defining constants
- h, ∆νCs and c:
-
- 1 kg = (h / 6.626 070 15 × 10⁻³⁴) m⁻² s
-
-
Effective (or "equivalent") dose of radiation received by a human or some other living organism. The metric system unit for this quantity is "Sv"
- (Sievert).
Degree of hotness or coldness of a body or an environment. The metric system unit for this quantity is "K" (Kelvin).
-
- The kelvin, symbol K, is the SI unit of thermodynamic temperature. It is defined by
- taking the fixed numerical value of the Boltzmann constant k to be 1.380 649 × 10−²³
- when expressed in the unit J K⁻¹, which is equal to kg m² s⁻² K⁻¹, where the
- kilogram, metre and second are defined in terms of h, c and ∆νCs.
-
- This definition implies the exact relation k = 1.380 649 × 10⁻²³ kg m² s⁻² K⁻¹. Inverting this
- relation gives an exact expression for the kelvin in terms of the defining constants k, h and
- ∆νCs:
-
- 1 K = (1.380 649 / k) × 10⁻²³ kg m² s⁻²
-
-
Period of existence or persistence. The metric system unit for this quantity is "s" (second).
-
- The second, symbol s, is the SI unit of time. It is defined by taking the fixed
- numerical value of the caesium frequency ∆νCs, the unperturbed ground-state
- hyperfine transition frequency of the caesium 133 atom, to be 9 192 631 770 when
- expressed in the unit Hz, which is equal to s⁻¹.
-
- This definition implies the exact relation ∆νCs = 9 192 631 770 Hz. Inverting this relation
- gives an expression for the unit second in terms of the defining constant ∆νCs:
-
- 1 Hz = ∆νCs / 9 192 631 770 or 1 s = 9 192 631 770 / ∆νCs
-
-
[OPTIONAL] Provides quantitative properties or attributes of thing such as
- mass, time, distance, heat, and angular separation.
- Quantities of different kinds are represented by sub-types of the
- Quantity interface.
-
-
Only quantities defined in the BIPM - SI Brochure
- are provided here. Users can create their own quantity types by extending the
- Quantity interface.
-
-
This package supports measurable quantities, which can be expressed
- as (Number, Unit) tuples.
- Those tuples are not necessarily used directly in numerically intensive code.
- They are more useful as meta-data converted to the application internal representation
- (for example double primitive type with the requirement to provide values in meters)
- before computation begins.
-
-
Quantity sub-types are also used as parameterized type to characterize
- generic classes and provide additional compile time check. This technique is
- used extensively by the Unit interface,
- but users can apply the same approach to their own classes. In the example
- below, Sensor, MyQuantity and Vector3D are user-defined
- classes:
-
-
- // A general-purpose Sensor class used for temperature measurements:
- Sensor<Temperature> sensor ...;
- Temperature temp = sensor.getValue();
-
- // A vector of velocity in a three-dimensional space.
- Unit<Speed> = metrePerSecond = METRE.divide(SECOND);
- Vector3D<Speed> aircraftSpeed = new Vector3D(200.0, 50.0, -0.5, metrePerSecond);
-
-
-
This package holds only the quantities required by the metric system.
Returns the enum constant of this type with the specified name.
-The string must match exactly an identifier used to declare an
-enum constant in this type. (Extraneous whitespace characters are
-not permitted.)
-
-
Parameters:
-
name - the name of the enum constant to be returned.
Returns the default quantity format.
-
- It is up to implementations what to consider a suitable default. For some (locale-sensitive) implementations it may be a quantity format based on
- Locale.current() while others may return getQuantityFormat("Simple") or getQuantityFormat("ISO").
Returns the quantity format having the specified name or null if none.
-
- For example (@code getQuantityFormat("Simple")} to return the simple QuantityFormat implementation.
Returns the default unit format.
-
- It is up to implementations what to consider a suitable default. For some (locale-sensitive) implementations it may be a unit format based on
- Locale.current() while others may return getUnitFormat("Simple") or getUnitFormat("ISO").
Returns the unit format having the specified name or null if none.
-
- For example getUnitFormat("Simple") to return a simple UnitFormat implementation.
Returns the unit format having the specified name or null if none.
-
- For example getUnitFormat("Simple") to return a simple UnitFormat implementation.
- The variant is an arbitrary value to allow a variation of a UnitFormat,
- for example UTF vs. ASCII encoding of the simple UnitFormat
- or case sensitive vs. case insensitiveUCUM format.
-
If no variant is applicable, the UnitFormat matching the name only is returned.
-
-
Parameters:
-
name - the name of the format.
-
variant - any arbitrary value used to indicate a variation of a UnitFormat.
Allows to define a priority for a registered ServiceProvider instance.
- When multiple providers are registered in the system, the provider with the highest priority value is taken.
-
-
If the "jakarta.annotation.Priority" annotation (from Jakarta Annotations)
- or "javax.annotation.Priority" annotation (from JSR-250) is present on the ServiceProvider
- implementation class, then that annotation (first if both were present) is taken and this getPriority() method is ignored.
- Otherwise – if a Priority annotation is absent – this method is used as a fallback.
Returns the list of all service providers available for the current thread's context class loader.
- The current service provider is always the first item in the returned list.
- Other service providers after the first item may depend on the caller thread
- (see service loader API note).
-
-
Returns:
-
all service providers available for the current thread's context class loader.
Returns the ServiceProvider with the specified name.
- The given name must match the name of at least one service provider available in the current thread's
- context class loader.
- The service provider names are the values of "jakarta.inject.Named" (from Jakarta Annotations) or
- "javax.inject.Named" (from JSR-330) annotations when present (first if both were present),
- or the value of Object.toString() method for providers without Named annotation.
-
-
Implementors are encouraged to provide an Named annotation or to override Object.toString()
- and use a unique enough name, e.g. the class name or other distinct attributes.
- Should multiple service providers nevertheless use the same name, the one with the highest
- priority wins.
- If there are no providers available, an IllegalStateException is thrown.
- Otherwise the provider with the highest priority is used
- or the one explicitly designated via setCurrent(ServiceProvider).
-
A system of units grouped together for historical or cultural reasons.
- Common system of units are "SI" (System International), "Imperial" (British), "US" (US Customary). Nothing prevents a unit from belonging to
- several systems of units at the same time (for example an Imperial system would have many of the units held by the US Customary
- system).
Returns a read only view over the units explicitly defined by this system. This include the base and derived units which are assigned a special
- name and symbol. This set does not include new units created by arithmetic or other operations.
-
- The default implementation assumes that prefixes of the given type are implemented as an enumeration.
- This is the case of the two default prefix implementations provided in JSR 385,
- namely MetricPrefix and BinaryPrefix.
- Implementors shall override this method if they provide prefixes implemented in a different way.
A system of units grouped together for historical or cultural reasons.
- Common system of units are "SI" (System International), "Imperial" (British), "US" (US Customary).
A system of units grouped together for historical or cultural reasons.
- Common system of units are "SI" (System International), "Imperial" (British), "US" (US Customary).
This interface represents the service to obtain a system
- of units.
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/site/apidocs/jquery-ui.overrides.css b/docs/site/apidocs/jquery-ui.overrides.css
deleted file mode 100644
index facf852c..00000000
--- a/docs/site/apidocs/jquery-ui.overrides.css
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-.ui-state-active,
-.ui-widget-content .ui-state-active,
-.ui-widget-header .ui-state-active,
-a.ui-button:active,
-.ui-button:active,
-.ui-button.ui-state-active:hover {
- /* Overrides the color of selection used in jQuery UI */
- background: #F8981D;
- border: 1px solid #F8981D;
-}
diff --git a/docs/site/apidocs/jquery/external/jquery/jquery.js b/docs/site/apidocs/jquery/external/jquery/jquery.js
deleted file mode 100644
index 9b5206bc..00000000
--- a/docs/site/apidocs/jquery/external/jquery/jquery.js
+++ /dev/null
@@ -1,10364 +0,0 @@
-/*!
- * jQuery JavaScript Library v3.3.1
- * https://jquery.com/
- *
- * Includes Sizzle.js
- * https://sizzlejs.com/
- *
- * Copyright JS Foundation and other contributors
- * Released under the MIT license
- * https://jquery.org/license
- *
- * Date: 2018-01-20T17:24Z
- */
-( function( global, factory ) {
-
- "use strict";
-
- if ( typeof module === "object" && typeof module.exports === "object" ) {
-
- // For CommonJS and CommonJS-like environments where a proper `window`
- // is present, execute the factory and get jQuery.
- // For environments that do not have a `window` with a `document`
- // (such as Node.js), expose a factory as module.exports.
- // This accentuates the need for the creation of a real `window`.
- // e.g. var jQuery = require("jquery")(window);
- // See ticket #14549 for more info.
- module.exports = global.document ?
- factory( global, true ) :
- function( w ) {
- if ( !w.document ) {
- throw new Error( "jQuery requires a window with a document" );
- }
- return factory( w );
- };
- } else {
- factory( global );
- }
-
-// Pass this if window is not defined yet
-} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
-
-// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
-// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
-// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
-// enough that all such attempts are guarded in a try block.
-"use strict";
-
-var arr = [];
-
-var document = window.document;
-
-var getProto = Object.getPrototypeOf;
-
-var slice = arr.slice;
-
-var concat = arr.concat;
-
-var push = arr.push;
-
-var indexOf = arr.indexOf;
-
-var class2type = {};
-
-var toString = class2type.toString;
-
-var hasOwn = class2type.hasOwnProperty;
-
-var fnToString = hasOwn.toString;
-
-var ObjectFunctionString = fnToString.call( Object );
-
-var support = {};
-
-var isFunction = function isFunction( obj ) {
-
- // Support: Chrome <=57, Firefox <=52
- // In some browsers, typeof returns "function" for HTML