public final class Factories extends Object
DecimalFactory instances.| Modifier and Type | Field and Description |
|---|---|
static List<DecimalFactory<?>> |
VALUES
All decimal factory constants in an immutable ordered list:
VALUES=[Factory0f.INSTANCE, Factory1f.INSTANCE, ..., Factory18f.INSTANCE] |
| Modifier and Type | Method and Description |
|---|---|
static DecimalFactory<?> |
getDecimalFactory(int scale)
Returns the
DecimalFactory constant based on a given scale. |
static <S extends ScaleMetrics> |
getDecimalFactory(S scaleMetrics)
Returns the
DecimalFactory for the given scale metrics. |
static GenericDecimalFactory<?> |
getGenericDecimalFactory(int scale)
Returns the
GenericDecimalFactory based on a given scale. |
static <S extends ScaleMetrics> |
getGenericDecimalFactory(S scaleMetrics)
Returns the
GenericDecimalFactory for the given scale metrics. |
public static final List<DecimalFactory<?>> VALUES
VALUES=[Factory0f.INSTANCE, Factory1f.INSTANCE, ..., Factory18f.INSTANCE]public static final DecimalFactory<?> getDecimalFactory(int scale)
DecimalFactory constant based on a given scale.scale - the scale value; must be in [0,18] both ends inclusivescaleIllegalArgumentException - if scale is not in [0, 18]public static final <S extends ScaleMetrics> DecimalFactory<S> getDecimalFactory(S scaleMetrics)
DecimalFactory for the given scale metrics.S - the generic type for scaleMetricsscaleMetrics - the scale metricsscaleMetricspublic static final GenericDecimalFactory<?> getGenericDecimalFactory(int scale)
GenericDecimalFactory based on a given scale.scale - the scale value; must be in [0,18] both ends inclusivescaleIllegalArgumentException - if scale is not in [0, 18]public static final <S extends ScaleMetrics> GenericDecimalFactory<S> getGenericDecimalFactory(S scaleMetrics)
GenericDecimalFactory for the given scale metrics.S - the generic type for scaleMetricsscaleMetrics - the scale metricsscaleMetrics