Skip to content

Commit eaddf17

Browse files
committed
Replace tabulation characters by 4 spaces, remove trailing spaces, remplace Windows-style end-of-line (CRLF) by Unix-style (LF) which is also the normalized from in Git database, and set a .gitattribute for allowing Window users to perform the change automatically.
The intent is to make easier for future merge request. Right now, it is difficult to submit even small changes without having our pull requested polluted by space changes. Furthermore all execution of "mvn install" currently results in all files being modified by checkstyle. See https://help.github.com/articles/dealing-with-line-endings/
1 parent f2f4f3c commit eaddf17

File tree

91 files changed

+7463
-7456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+7463
-7456
lines changed

.gitattributes

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Explicitly declare text files to always be normalized and converted
2+
# to native line endings on checkout.
3+
*.java text
4+
*.xml text
+99-99
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,99 @@
1-
/*
2-
* Units of Measurement API
3-
* Copyright (c) 2014-2018, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
4-
*
5-
* All rights reserved.
6-
*
7-
* Redistribution and use in source and binary forms, with or without modification,
8-
* are permitted provided that the following conditions are met:
9-
*
10-
* 1. Redistributions of source code must retain the above copyright notice,
11-
* this list of conditions and the following disclaimer.
12-
*
13-
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
14-
* and the following disclaimer in the documentation and/or other materials provided with the distribution.
15-
*
16-
* 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
17-
* derived from this software without specific prior written permission.
18-
*
19-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21-
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22-
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25-
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26-
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28-
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29-
*/
30-
package javax.measure;
31-
32-
import java.util.Map;
33-
34-
/**
35-
* Represents the dimension of a unit.
36-
*
37-
* <p>
38-
* Concrete dimensions are obtained through the {@link Unit#getDimension()} method.
39-
* </p>
40-
*
41-
* <p>
42-
* Two units {@code u1} and {@code u2} are {@linkplain Unit#isCompatible(Unit) compatible} if and only if
43-
* {@code u1.getDimension().equals(u2.getDimension())}.
44-
* </p>
45-
*
46-
* @author <a href="mailto:[email protected]">Jean-Marie Dautelle</a>
47-
* @author <a href="mailto:[email protected]">Werner Keil</a>
48-
* @version 1.0, August 8, 2016
49-
* @since 1.0
50-
* @see Unit
51-
* @see <a href="http://en.wikipedia.org/wiki/Dimensional_analysis">Wikipedia: Dimensional Analysis</a>
52-
*/
53-
public interface Dimension {
54-
/**
55-
* Returns the product of this dimension with the one specified.
56-
*
57-
* @param multiplicand
58-
* the dimension multiplicand.
59-
* @return {@code this * multiplicand}
60-
*/
61-
Dimension multiply(Dimension multiplicand);
62-
63-
/**
64-
* Returns the quotient of this dimension with the one specified.
65-
*
66-
* @param divisor
67-
* the dimension divisor.
68-
* @return {@code this / divisor}
69-
*/
70-
Dimension divide(Dimension divisor);
71-
72-
/**
73-
* Returns this dimension raised to an exponent. <tt>(this<sup>n</sup>)</tt>
74-
*
75-
* @param n
76-
* power to raise this {@code Dimension} to.
77-
* @return <tt>this<sup>n</sup></tt>
78-
*/
79-
Dimension pow(int n);
80-
81-
/**
82-
* Returns the given root of this dimension.
83-
*
84-
* @param n
85-
* the root's order.
86-
* @return the result of taking the given root of this dimension.
87-
* @throws ArithmeticException
88-
* if {@code n == 0}.
89-
*/
90-
Dimension root(int n);
91-
92-
/**
93-
* Returns the (fundamental) base dimensions and their exponent whose product is this dimension, or {@code null} if this dimension is a base
94-
* dimension.
95-
*
96-
* @return the mapping between the fundamental dimensions and their exponent.
97-
*/
98-
Map<? extends Dimension, Integer> getBaseDimensions();
99-
}
1+
/*
2+
* Units of Measurement API
3+
* Copyright (c) 2014-2018, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
4+
*
5+
* All rights reserved.
6+
*
7+
* Redistribution and use in source and binary forms, with or without modification,
8+
* are permitted provided that the following conditions are met:
9+
*
10+
* 1. Redistributions of source code must retain the above copyright notice,
11+
* this list of conditions and the following disclaimer.
12+
*
13+
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
14+
* and the following disclaimer in the documentation and/or other materials provided with the distribution.
15+
*
16+
* 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
17+
* derived from this software without specific prior written permission.
18+
*
19+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21+
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
package javax.measure;
31+
32+
import java.util.Map;
33+
34+
/**
35+
* Represents the dimension of a unit.
36+
*
37+
* <p>
38+
* Concrete dimensions are obtained through the {@link Unit#getDimension()} method.
39+
* </p>
40+
*
41+
* <p>
42+
* Two units {@code u1} and {@code u2} are {@linkplain Unit#isCompatible(Unit) compatible} if and only if
43+
* {@code u1.getDimension().equals(u2.getDimension())}.
44+
* </p>
45+
*
46+
* @author <a href="mailto:[email protected]">Jean-Marie Dautelle</a>
47+
* @author <a href="mailto:[email protected]">Werner Keil</a>
48+
* @version 1.0, August 8, 2016
49+
* @since 1.0
50+
* @see Unit
51+
* @see <a href="http://en.wikipedia.org/wiki/Dimensional_analysis">Wikipedia: Dimensional Analysis</a>
52+
*/
53+
public interface Dimension {
54+
/**
55+
* Returns the product of this dimension with the one specified.
56+
*
57+
* @param multiplicand
58+
* the dimension multiplicand.
59+
* @return {@code this * multiplicand}
60+
*/
61+
Dimension multiply(Dimension multiplicand);
62+
63+
/**
64+
* Returns the quotient of this dimension with the one specified.
65+
*
66+
* @param divisor
67+
* the dimension divisor.
68+
* @return {@code this / divisor}
69+
*/
70+
Dimension divide(Dimension divisor);
71+
72+
/**
73+
* Returns this dimension raised to an exponent. <tt>(this<sup>n</sup>)</tt>
74+
*
75+
* @param n
76+
* power to raise this {@code Dimension} to.
77+
* @return <tt>this<sup>n</sup></tt>
78+
*/
79+
Dimension pow(int n);
80+
81+
/**
82+
* Returns the given root of this dimension.
83+
*
84+
* @param n
85+
* the root's order.
86+
* @return the result of taking the given root of this dimension.
87+
* @throws ArithmeticException
88+
* if {@code n == 0}.
89+
*/
90+
Dimension root(int n);
91+
92+
/**
93+
* Returns the (fundamental) base dimensions and their exponent whose product is this dimension, or {@code null} if this dimension is a base
94+
* dimension.
95+
*
96+
* @return the mapping between the fundamental dimensions and their exponent.
97+
*/
98+
Map<? extends Dimension, Integer> getBaseDimensions();
99+
}
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,86 @@
1-
/*
2-
* Units of Measurement API
3-
* Copyright (c) 2014-2018, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
4-
*
5-
* All rights reserved.
6-
*
7-
* Redistribution and use in source and binary forms, with or without modification,
8-
* are permitted provided that the following conditions are met:
9-
*
10-
* 1. Redistributions of source code must retain the above copyright notice,
11-
* this list of conditions and the following disclaimer.
12-
*
13-
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
14-
* and the following disclaimer in the documentation and/or other materials provided with the distribution.
15-
*
16-
* 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
17-
* derived from this software without specific prior written permission.
18-
*
19-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21-
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22-
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25-
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26-
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28-
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29-
*/
30-
package javax.measure;
31-
32-
/**
33-
* Signals that a problem of some sort has occurred due to incommensurable of some quantities/units. Only commensurable quantity (quantities with the
34-
* same dimensions) may be compared, equated, added, or subtracted. Also, one unit can be converted to another unit only if both units are
35-
* commensurable.
36-
* <p>
37-
* This is a <strong>checked</strong> exception, so it deliberately doesn't inherit from <code>MeasurementException</code> like most other exceptions.
38-
* </p>
39-
*
40-
* @author <a href="mailto:[email protected]">Jean-Marie Dautelle</a>
41-
* @author <a href="mailto:[email protected]">Werner Keil</a>
42-
* @version 1.0, August 8, 2016
43-
* @since 1.0
44-
*
45-
* @see <a href="http://en.wikipedia.org/wiki/Unit_commensurability#Commensurability">Wikipedia: Unit Commensurability</a>
46-
*/
47-
public class IncommensurableException extends Exception {
48-
/**
49-
* For cross-version compatibility.
50-
*/
51-
private static final long serialVersionUID = -3676414292638136515L;
52-
53-
/**
54-
* Constructs a {@code IncommensurableException} with the given message.
55-
*
56-
* @param message
57-
* the detail message, or {@code null} if none.
58-
*/
59-
public IncommensurableException(final String message) {
60-
super(message);
61-
}
62-
63-
/**
64-
* Constructs a {@code IncommensurableException} with the given cause.
65-
*
66-
* @param cause
67-
* the cause of this exception, or {@code null} if none.
68-
*
69-
*/
70-
public IncommensurableException(final Throwable cause) {
71-
super(cause);
72-
}
73-
74-
/**
75-
* Constructs a {@code IncommensurableException} with the given message and cause.
76-
*
77-
* @param message
78-
* the detail message, or {@code null} if none.
79-
* @param cause
80-
* the cause of this exception, or {@code null} if none.
81-
*
82-
*/
83-
public IncommensurableException(final String message, final Throwable cause) {
84-
super(message, cause);
85-
}
86-
}
1+
/*
2+
* Units of Measurement API
3+
* Copyright (c) 2014-2018, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
4+
*
5+
* All rights reserved.
6+
*
7+
* Redistribution and use in source and binary forms, with or without modification,
8+
* are permitted provided that the following conditions are met:
9+
*
10+
* 1. Redistributions of source code must retain the above copyright notice,
11+
* this list of conditions and the following disclaimer.
12+
*
13+
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
14+
* and the following disclaimer in the documentation and/or other materials provided with the distribution.
15+
*
16+
* 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
17+
* derived from this software without specific prior written permission.
18+
*
19+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21+
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
package javax.measure;
31+
32+
/**
33+
* Signals that a problem of some sort has occurred due to incommensurable of some quantities/units. Only commensurable quantity (quantities with the
34+
* same dimensions) may be compared, equated, added, or subtracted. Also, one unit can be converted to another unit only if both units are
35+
* commensurable.
36+
* <p>
37+
* This is a <strong>checked</strong> exception, so it deliberately doesn't inherit from <code>MeasurementException</code> like most other exceptions.
38+
* </p>
39+
*
40+
* @author <a href="mailto:[email protected]">Jean-Marie Dautelle</a>
41+
* @author <a href="mailto:[email protected]">Werner Keil</a>
42+
* @version 1.0, August 8, 2016
43+
* @since 1.0
44+
*
45+
* @see <a href="http://en.wikipedia.org/wiki/Unit_commensurability#Commensurability">Wikipedia: Unit Commensurability</a>
46+
*/
47+
public class IncommensurableException extends Exception {
48+
/**
49+
* For cross-version compatibility.
50+
*/
51+
private static final long serialVersionUID = -3676414292638136515L;
52+
53+
/**
54+
* Constructs a {@code IncommensurableException} with the given message.
55+
*
56+
* @param message
57+
* the detail message, or {@code null} if none.
58+
*/
59+
public IncommensurableException(final String message) {
60+
super(message);
61+
}
62+
63+
/**
64+
* Constructs a {@code IncommensurableException} with the given cause.
65+
*
66+
* @param cause
67+
* the cause of this exception, or {@code null} if none.
68+
*
69+
*/
70+
public IncommensurableException(final Throwable cause) {
71+
super(cause);
72+
}
73+
74+
/**
75+
* Constructs a {@code IncommensurableException} with the given message and cause.
76+
*
77+
* @param message
78+
* the detail message, or {@code null} if none.
79+
* @param cause
80+
* the cause of this exception, or {@code null} if none.
81+
*
82+
*/
83+
public IncommensurableException(final String message, final Throwable cause) {
84+
super(message, cause);
85+
}
86+
}

0 commit comments

Comments
 (0)