raynigon / unit-api Goto Github PK
View Code? Open in Web Editor NEWRaynigon Unit Api - JSR-385
Home Page: https://unit-api.raynigon.com/
License: Apache License 2.0
Raynigon Unit Api - JSR-385
Home Page: https://unit-api.raynigon.com/
License: Apache License 2.0
Is your feature request related to a problem? Please describe.
I want to parse quantities like "1cm", "5m/s" etc.
Describe the solution you'd like
It would be nice to have the ability to pass custom parser/serializers with the annotation.
Describe alternatives you've considered
Make if possible to parse the given quantities by default.
Make it possible to enable the automatic use of system units, but disable it by default.
Is your feature request related to a problem? Please describe.
I'm always frustrated when using Quantity Arrays in PostgreSQL
Describe the solution you'd like
@Column(name = "elevations", nullable = false)
private Quantity<Length>[] elevations
Describe alternatives you've considered
Converting the Quantity Array to a double Array.
We want to use the Unit classes for the JsonUnit/JpaUnit Annotations.
This should prevent misspelling (at runtime), due to compiler checks.
Aceptance Criteria
value
property type is Class<Unit>
unit
property type is Class<Unit>
value
property type is Class<Unit>
unit
property type is Class<Unit>
Is your feature request related to a problem? Please describe.
I would like to Serialize/Deserialize Quantities as Objects
Describe the solution you'd like
I would like to Serialize/Deserialize Quantities as Objects
Describe alternatives you've considered
It has come to my attention, that the JPA Usage description is not good enough.
It was not clear for some users, to use the type descriptor annotation for their entity.
This should be improved.
Is your feature request related to a problem? Please describe.
I'm always frustrated when i need to store a Unit in the Database.
Describe the solution you'd like
Handle the Unit type similar to Quantities
Describe the bug
Since Version 1.1.3 a jar archive with not claffisier is no longer available in maven.
Is your feature request related to a problem? Please describe.
I'm always frustrated when i have to deal with negative Quantities.
Example: Metre(-12.0) < Metre(11.0)
Describe the solution you'd like
It would be nice to have an absolute value converter.
Metre(-12.0).abs() < Metre(11.0)
Describe alternatives you've considered
Currently i use something like:
Quantity<Length> x = Metre(-12.0)
if ((x < Metre(0.0) && x < Metre(-11.0)) || (x > Metre(0.0) && x > Metre(11.0)) {
...
}
For the Kotlin Part of my Code i used this extension function:
fun <T : Quantity<T>> Quantity<T>.abs(): Quantity<T> {
if (this.value.toDouble() < 0)
return this * -1.0
return this
}
Provide Extension Methods for the Time Quantity to convert it to a duration and the other way around.
val duration = Duration.ofSeconds(10)
val quantity = duration.toQuantity()
val result = quantity.toDuration()
Describe the bug
JsonQuantityReader Annotation is broken and not covered by test cases.
To Reproduce
JsonQuantityReader
Expected behavior
@Target({METHOD, FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface JsonQuantityReader {
Additional context
Add any other context about the problem here.
Describe the bug
The springdoc property does not use the specified quantity shape.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.