Skip to content

help find my way in uom and related libs #426

Open
@reeg33

Description

@reeg33

Hello,

i'm not convinced that's the correct place to post, but maybe someone can redirect me if that's the case.

I need to implement in my code a system that allows unit conversions. Until now, seems the correct place. But, I don't really know how to begin with. I read JSR 385 Specification, i added uom-api to maven, but I found it was only "core code" and I needed to add implemented version. Then I found this RI, but still I have some units that are not present in "Unit.class". How do I code them ? Duplicate all project and modify ? seems I can't extend most of them indroya files (and when I can, methods are private so I can't really go further)
Things like
public static final Unit<ThermalConductivity> BTU_PER_HOUR_FAHRENHEIT_FOOT = addUnit(new ProductUnit<>(BTU_PER_HOUR_FAHRENHEIT.divide(FOOT)).asType(ThermalConductivity.class)); public static final Unit<MolarMass> GRAMME_PAR_MOL = addUnit(new ProductUnit<>(GRAM.divide(MOLE)).asType(MolarMass.class));

Is there a "getting started" or "how do i implement my own units" documentation somewhere ? Do I need some more libraries to do the job ?

Sorry if it's a lot of questions, but I find this lib very close to what I want, but seems I dont know how to make it work for me :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions