Package world.mappable.runtime.i18n

Class CanonicalUnit

java.lang.Object
    ↳ world.mappable.runtime.i18n.CanonicalUnit

class CanonicalUnit implements Serializable

Represents a unit with the value and measurement separated.

Summary

Constructors

Signature and Description

CanonicalUnit(@NonNull java.lang.String unit,
              double value)

CanonicalUnit()
Use constructor with parameters in your code.

Methods

Type and modifiers

Method and Description

java.lang.String

getUnit()
The unit of measurement.

double

getValue()
The numerical value.

void

serialize(world.mappable.runtime.bindings.Archive archive)

Constuctors

CanonicalUnit

CanonicalUnit(@NonNull java.lang.String unit,
              double value)


CanonicalUnit

CanonicalUnit()

Use constructor with parameters in your code.

This one is for bindings only!


Methods

getUnit

@NonNull
java.lang.String getUnit()

The unit of measurement.


getValue

double getValue()

The numerical value.


serialize

@Override
void serialize(world.mappable.runtime.bindings.Archive archive)