How to resolve a Quantity instance for a Number and Unit
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start with the javax.measure.spi.ServiceProvider and QuantityFactory entry points named in the issue, then compare them with Indriya's Quantities.getQuantity(Number, Unit) implementation. Determine whether the standard API supports this without a runtime Quantity class; document the answer and any required API change or limitation.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hello, I am not finding how to resolve a Quantity<?> instance if I am starting with a Number and a Unit<?> instance, using only the javax.measure API. The trouble here is that I don't know the Quantity class at runtime, so I can't call javax.measure.spi.ServiceProvider.getQuantityFactory(Class<Q> quantity) to get the appropriate QuantityFactory on which I could call javax.measure.spi.QuantityFactory.create(Number value, Unit<Q> unit).
I don't know there is a very easy way using Indriya: tech.units.indriya.quantity.Quantities.getQuantity(Number value, Unit<Q> unit) but I am trying to understand how to achieve the same thing with only the javax.measure API. Could you point me in the right direction?
- Ngôn ngữ chính
- Java
- Star
- 195
- Fork
- 41
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của unitsofmeasurement/unit-api
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
unitsofmeasurement/unit-api#261 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
unitsofmeasurement/unit-api#260 · 1 bình luận ·
-
deferred design
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
unitsofmeasurement/unit-api#256 · 5 bình luận ·
-
Explore JDK Vector API Đang mởdeferred design enhancement jdk
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
unitsofmeasurement/unit-api#215 ·
-
Classpath Discovery Đang mởdeferred enhancement jdk ready task
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
unitsofmeasurement/unit-api#90 · 1 bình luận ·
Tất cả issue của unitsofmeasurement/unit-api
Issue tương tự
-
area-deployment area-integrations triage:bot-seen
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 86/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
apache/flink-agents#1156 ·
-
[source-shopify] FAILED bulk operation without partialDataUrl is silently treated as successful Đang mởarea/connectors autoteam community connectors/source/shopify needs-triage team/use type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100