Skip to content

Commit 3fb80fe

Browse files
committed
Version 2.1
1 parent 9e619ab commit 3fb80fe

File tree

4 files changed

+45
-100
lines changed

4 files changed

+45
-100
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ project, add the following to the `dependencies` section in your `pom.xml` file:
1919
<dependency>
2020
<groupId>com.upokecenter</groupId>
2121
<artifactId>cbor</artifactId>
22-
<version>2.0.0</version>
22+
<version>2.1.0</version>
2323
</dependency>
2424
```
2525

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.upokecenter</groupId>
55
<artifactId>cbor</artifactId>
66
<packaging>jar</packaging>
7-
<version>2.1.0-SNAPSHOT</version>
7+
<version>2.1.0</version>
88
<name>CBOR</name>
99
<description>
1010
A Java implementation of Concise Binary Object Representation (CBOR), a general-purpose binary data format defined in RFC 7049. According to that RFC, CBOR's data model "is an extended version of the JSON data model", supporting many more types of data than JSON. This implementation was written by Peter O. and is released to the Public Domain under the CC0 Declaration.

src/main/java/com/upokecenter/util/ExtendedDecimal.java

Lines changed: 24 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3109,15 +3109,7 @@ public static ExtendedDecimal PI(PrecisionContext ctx) {
31093109

31103110
/**
31113111
* Returns a number similar to this number but with the decimal point moved to
3112-
* the right. <param name='ctx'>A precision context to control
3113-
* precision, rounding, and exponent range of the result. If HasFlags of
3114-
* the context is true, will also store the flags resulting from the
3115-
* operation (the flags are in addition to the pre-existing flags). Can
3116-
* be null.</param>
3117-
* @param ctx A precision context to control precision, rounding, and exponent
3118-
* range of the result. If HasFlags of the context is true, will also
3119-
* store the flags resulting from the operation (the flags are in
3120-
* addition to the pre-existing flags). Can be null.
3112+
* the right.
31213113
* @param places A 32-bit signed integer.
31223114
* @return An ExtendedDecimal object.
31233115
*/
@@ -3127,17 +3119,12 @@ public ExtendedDecimal MovePointLeft(int places) {
31273119

31283120
/**
31293121
* Returns a number similar to this number but with the decimal point moved to
3130-
* the left. <param name='ctx'>A precision context to control precision,
3131-
* rounding, and exponent range of the result. If HasFlags of the
3132-
* context is true, will also store the flags resulting from the
3133-
* operation (the flags are in addition to the pre-existing flags). Can
3134-
* be null.</param>
3122+
* the left.
3123+
* @param places A 32-bit signed integer.
31353124
* @param ctx A precision context to control precision, rounding, and exponent
31363125
* range of the result. If HasFlags of the context is true, will also
31373126
* store the flags resulting from the operation (the flags are in
31383127
* addition to the pre-existing flags). Can be null.
3139-
* @param places A 32-bit signed integer.
3140-
* @param ctx A PrecisionContext object.
31413128
* @return An ExtendedDecimal object.
31423129
*/
31433130
public ExtendedDecimal MovePointLeft(int places, PrecisionContext ctx) {
@@ -3146,15 +3133,7 @@ public ExtendedDecimal MovePointLeft(int places, PrecisionContext ctx) {
31463133

31473134
/**
31483135
* Returns a number similar to this number but with the decimal point moved to
3149-
* the left. <param name='ctx'>A precision context to control precision,
3150-
* rounding, and exponent range of the result. If HasFlags of the
3151-
* context is true, will also store the flags resulting from the
3152-
* operation (the flags are in addition to the pre-existing flags). Can
3153-
* be null.</param>
3154-
* @param ctx A precision context to control precision, rounding, and exponent
3155-
* range of the result. If HasFlags of the context is true, will also
3156-
* store the flags resulting from the operation (the flags are in
3157-
* addition to the pre-existing flags). Can be null.
3136+
* the left.
31583137
* @param bigPlaces A BigInteger object.
31593138
* @return An ExtendedDecimal object.
31603139
*/
@@ -3164,17 +3143,12 @@ public ExtendedDecimal MovePointLeft(BigInteger bigPlaces) {
31643143

31653144
/**
31663145
* Returns a number similar to this number but with the decimal point moved to
3167-
* the left. <param name='ctx'>A precision context to control precision,
3168-
* rounding, and exponent range of the result. If HasFlags of the
3169-
* context is true, will also store the flags resulting from the
3170-
* operation (the flags are in addition to the pre-existing flags). Can
3171-
* be null.</param>
3146+
* the left.
3147+
* @param bigPlaces A BigInteger object.
31723148
* @param ctx A precision context to control precision, rounding, and exponent
31733149
* range of the result. If HasFlags of the context is true, will also
31743150
* store the flags resulting from the operation (the flags are in
31753151
* addition to the pre-existing flags). Can be null.
3176-
* @param bigPlaces A BigInteger object.
3177-
* @param ctx A PrecisionContext object.
31783152
* @return An ExtendedDecimal object.
31793153
*/
31803154
public ExtendedDecimal MovePointLeft(
@@ -3201,7 +3175,10 @@ public ExtendedDecimal MovePointRight(int places) {
32013175
* Returns a number similar to this number but with the decimal point moved to
32023176
* the right.
32033177
* @param places A 32-bit signed integer.
3204-
* @param ctx A PrecisionContext object.
3178+
* @param ctx A precision context to control precision, rounding, and exponent
3179+
* range of the result. If HasFlags of the context is true, will also
3180+
* store the flags resulting from the operation (the flags are in
3181+
* addition to the pre-existing flags). Can be null.
32053182
* @return An ExtendedDecimal object.
32063183
*/
32073184
public ExtendedDecimal MovePointRight(int places, PrecisionContext ctx) {
@@ -3210,15 +3187,7 @@ public ExtendedDecimal MovePointRight(int places, PrecisionContext ctx) {
32103187

32113188
/**
32123189
* Returns a number similar to this number but with the decimal point moved to
3213-
* the right. <param name='ctx'>A precision context to control
3214-
* precision, rounding, and exponent range of the result. If HasFlags of
3215-
* the context is true, will also store the flags resulting from the
3216-
* operation (the flags are in addition to the pre-existing flags). Can
3217-
* be null.</param>
3218-
* @param ctx A precision context to control precision, rounding, and exponent
3219-
* range of the result. If HasFlags of the context is true, will also
3220-
* store the flags resulting from the operation (the flags are in
3221-
* addition to the pre-existing flags). Can be null.
3190+
* the right.
32223191
* @param bigPlaces A BigInteger object.
32233192
* @return An ExtendedDecimal object.
32243193
*/
@@ -3230,7 +3199,10 @@ public ExtendedDecimal MovePointRight(BigInteger bigPlaces) {
32303199
* Returns a number similar to this number but with the decimal point moved to
32313200
* the right.
32323201
* @param bigPlaces A BigInteger object.
3233-
* @param ctx A PrecisionContext object.
3202+
* @param ctx A precision context to control precision, rounding, and exponent
3203+
* range of the result. If HasFlags of the context is true, will also
3204+
* store the flags resulting from the operation (the flags are in
3205+
* addition to the pre-existing flags). Can be null.
32343206
* @return A number whose scale is increased by {@code bigPlaces} , but not to
32353207
* more than 0.
32363208
*/
@@ -3272,23 +3244,18 @@ public ExtendedDecimal ScaleByPowerOfTen(int places) {
32723244
/**
32733245
* Returns a number similar to this number but with the scale adjusted.
32743246
* @param places A 32-bit signed integer.
3275-
* @param ctx A PrecisionContext object.
3247+
* @param ctx A precision context to control precision, rounding, and exponent
3248+
* range of the result. If HasFlags of the context is true, will also
3249+
* store the flags resulting from the operation (the flags are in
3250+
* addition to the pre-existing flags). Can be null.
32763251
* @return An ExtendedDecimal object.
32773252
*/
32783253
public ExtendedDecimal ScaleByPowerOfTen(int places, PrecisionContext ctx) {
32793254
return this.ScaleByPowerOfTen(BigInteger.valueOf(places), ctx);
32803255
}
32813256

32823257
/**
3283-
* Returns a number similar to this number but with the scale adjusted. <param
3284-
* name='ctx'>A precision context to control precision, rounding, and
3285-
* exponent range of the result. If HasFlags of the context is true,
3286-
* will also store the flags resulting from the operation (the flags are
3287-
* in addition to the pre-existing flags). Can be null.</param>
3288-
* @param ctx A precision context to control precision, rounding, and exponent
3289-
* range of the result. If HasFlags of the context is true, will also
3290-
* store the flags resulting from the operation (the flags are in
3291-
* addition to the pre-existing flags). Can be null.
3258+
* Returns a number similar to this number but with the scale adjusted.
32923259
* @param bigPlaces A BigInteger object.
32933260
* @return An ExtendedDecimal object.
32943261
*/
@@ -3299,7 +3266,10 @@ public ExtendedDecimal ScaleByPowerOfTen(BigInteger bigPlaces) {
32993266
/**
33003267
* Returns a number similar to this number but with its scale adjusted.
33013268
* @param bigPlaces A BigInteger object.
3302-
* @param ctx A PrecisionContext object.
3269+
* @param ctx A precision context to control precision, rounding, and exponent
3270+
* range of the result. If HasFlags of the context is true, will also
3271+
* store the flags resulting from the operation (the flags are in
3272+
* addition to the pre-existing flags). Can be null.
33033273
* @return A number whose scale is increased by {@code bigPlaces} .
33043274
*/
33053275
public ExtendedDecimal ScaleByPowerOfTen(

src/main/java/com/upokecenter/util/ExtendedFloat.java

Lines changed: 19 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,15 +2272,7 @@ public static ExtendedFloat PI(PrecisionContext ctx) {
22722272

22732273
/**
22742274
* Returns a number similar to this number but with the radix point moved to
2275-
* the left. <param name='ctx'>A precision context to control precision,
2276-
* rounding, and exponent range of the result. If HasFlags of the
2277-
* context is true, will also store the flags resulting from the
2278-
* operation (the flags are in addition to the pre-existing flags). Can
2279-
* be null.</param>
2280-
* @param ctx A precision context to control precision, rounding, and exponent
2281-
* range of the result. If HasFlags of the context is true, will also
2282-
* store the flags resulting from the operation (the flags are in
2283-
* addition to the pre-existing flags). Can be null.
2275+
* the left.
22842276
* @param places A 32-bit signed integer.
22852277
* @return An ExtendedFloat object.
22862278
*/
@@ -2290,17 +2282,12 @@ public ExtendedFloat MovePointLeft(int places) {
22902282

22912283
/**
22922284
* Returns a number similar to this number but with the radix point moved to
2293-
* the left. <param name='ctx'>A precision context to control precision,
2294-
* rounding, and exponent range of the result. If HasFlags of the
2295-
* context is true, will also store the flags resulting from the
2296-
* operation (the flags are in addition to the pre-existing flags). Can
2297-
* be null.</param>
2285+
* the left.
2286+
* @param places A 32-bit signed integer.
22982287
* @param ctx A precision context to control precision, rounding, and exponent
22992288
* range of the result. If HasFlags of the context is true, will also
23002289
* store the flags resulting from the operation (the flags are in
23012290
* addition to the pre-existing flags). Can be null.
2302-
* @param places A 32-bit signed integer.
2303-
* @param ctx A PrecisionContext object.
23042291
* @return An ExtendedFloat object.
23052292
*/
23062293
public ExtendedFloat MovePointLeft(int places, PrecisionContext ctx) {
@@ -2309,15 +2296,7 @@ public ExtendedFloat MovePointLeft(int places, PrecisionContext ctx) {
23092296

23102297
/**
23112298
* Returns a number similar to this number but with the radix point moved to
2312-
* the left. <param name='ctx'>A precision context to control precision,
2313-
* rounding, and exponent range of the result. If HasFlags of the
2314-
* context is true, will also store the flags resulting from the
2315-
* operation (the flags are in addition to the pre-existing flags). Can
2316-
* be null.</param>
2317-
* @param ctx A precision context to control precision, rounding, and exponent
2318-
* range of the result. If HasFlags of the context is true, will also
2319-
* store the flags resulting from the operation (the flags are in
2320-
* addition to the pre-existing flags). Can be null.
2299+
* the left.
23212300
* @param bigPlaces A BigInteger object.
23222301
* @return An ExtendedFloat object.
23232302
*/
@@ -2329,7 +2308,10 @@ public ExtendedFloat MovePointLeft(BigInteger bigPlaces) {
23292308
* Returns a number similar to this number but with the radix point moved to
23302309
* the left.
23312310
* @param bigPlaces A BigInteger object.
2332-
* @param ctx A PrecisionContext object.
2311+
* @param ctx A precision context to control precision, rounding, and exponent
2312+
* range of the result. If HasFlags of the context is true, will also
2313+
* store the flags resulting from the operation (the flags are in
2314+
* addition to the pre-existing flags). Can be null.
23332315
* @return An ExtendedFloat object.
23342316
*/
23352317
public ExtendedFloat MovePointLeft(
@@ -2356,7 +2338,10 @@ public ExtendedFloat MovePointRight(int places) {
23562338
* Returns a number similar to this number but with the radix point moved to
23572339
* the right.
23582340
* @param places A 32-bit signed integer.
2359-
* @param ctx A PrecisionContext object.
2341+
* @param ctx A precision context to control precision, rounding, and exponent
2342+
* range of the result. If HasFlags of the context is true, will also
2343+
* store the flags resulting from the operation (the flags are in
2344+
* addition to the pre-existing flags). Can be null.
23602345
* @return An ExtendedFloat object.
23612346
*/
23622347
public ExtendedFloat MovePointRight(int places, PrecisionContext ctx) {
@@ -2375,17 +2360,12 @@ public ExtendedFloat MovePointRight(BigInteger bigPlaces) {
23752360

23762361
/**
23772362
* Returns a number similar to this number but with the radix point moved to
2378-
* the right. <param name='ctx'>A precision context to control
2379-
* precision, rounding, and exponent range of the result. If HasFlags of
2380-
* the context is true, will also store the flags resulting from the
2381-
* operation (the flags are in addition to the pre-existing flags). Can
2382-
* be null.</param>
2363+
* the right.
2364+
* @param bigPlaces A BigInteger object.
23832365
* @param ctx A precision context to control precision, rounding, and exponent
23842366
* range of the result. If HasFlags of the context is true, will also
23852367
* store the flags resulting from the operation (the flags are in
23862368
* addition to the pre-existing flags). Can be null.
2387-
* @param bigPlaces A BigInteger object.
2388-
* @param ctx A PrecisionContext object.
23892369
* @return A number whose scale is increased by {@code bigPlaces} , but not to
23902370
* more than 0.
23912371
*/
@@ -2427,23 +2407,18 @@ public ExtendedFloat ScaleByPowerOfTwo(int places) {
24272407
/**
24282408
* Returns a number similar to this number but with the scale adjusted.
24292409
* @param places A 32-bit signed integer.
2430-
* @param ctx A PrecisionContext object.
2410+
* @param ctx A precision context to control precision, rounding, and exponent
2411+
* range of the result. If HasFlags of the context is true, will also
2412+
* store the flags resulting from the operation (the flags are in
2413+
* addition to the pre-existing flags). Can be null.
24312414
* @return An ExtendedDecimal object.
24322415
*/
24332416
public ExtendedFloat ScaleByPowerOfTwo(int places, PrecisionContext ctx) {
24342417
return this.ScaleByPowerOfTwo(BigInteger.valueOf(places), ctx);
24352418
}
24362419

24372420
/**
2438-
* Returns a number similar to this number but with the scale adjusted. <param
2439-
* name='ctx'>A precision context to control precision, rounding, and
2440-
* exponent range of the result. If HasFlags of the context is true,
2441-
* will also store the flags resulting from the operation (the flags are
2442-
* in addition to the pre-existing flags). Can be null.</param>
2443-
* @param ctx A precision context to control precision, rounding, and exponent
2444-
* range of the result. If HasFlags of the context is true, will also
2445-
* store the flags resulting from the operation (the flags are in
2446-
* addition to the pre-existing flags). Can be null.
2421+
* Returns a number similar to this number but with the scale adjusted.
24472422
* @param bigPlaces A BigInteger object.
24482423
* @return An ExtendedDecimal object.
24492424
*/

0 commit comments

Comments
 (0)