protected static class LinearUnit.Custom extends LinearUnit
LinearUnit.Custom
TypedUnit.UnitSelector<U extends TypedUnit<U>>
Modifier and Type | Field and Description |
---|---|
private LinearUnit |
definitionUnit |
private ScaleFactor |
factorToDefinition |
EMPTY_STRING_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
Custom(LinearKindOfQuantity kindOfQuantity,
java.lang.String unitId,
ScaleFactor factorToDefinition,
LinearUnit definitionUnit,
java.lang.String unitSymbol,
java.lang.String unitDesc,
java.lang.String... altNames) |
Modifier and Type | Method and Description |
---|---|
ITypedQuantity<LinearUnit> |
asWellKnownQuantity() |
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
protected boolean |
isCustom() |
protected java.lang.String |
localizedFormatFor(java.lang.Number numericalValue,
boolean useBreakingSpace,
boolean allowCustomUnit) |
protected java.lang.String |
persistableStringFor(java.lang.Number numericalValue) |
add, compareTo, customParseInteractive, floorQuantize, floorQuantize, getAltLocalizedNames, getAppendableSuffix, getContentType, getDeltaUnit, getIdentifier, getLocalizedDescription, getLocalizedSymbol, getScaledUnit, getUnitClass, isLinear, quantity, quantity, subtractSame, toString, valueTransformTo
addPossiblyIntegral, quantity, valueTransformTo
private final ScaleFactor factorToDefinition
private final LinearUnit definitionUnit
protected Custom(LinearKindOfQuantity kindOfQuantity, java.lang.String unitId, ScaleFactor factorToDefinition, LinearUnit definitionUnit, java.lang.String unitSymbol, java.lang.String unitDesc, java.lang.String... altNames)
protected boolean isCustom()
isCustom
in class LinearUnit
public ITypedQuantity<LinearUnit> asWellKnownQuantity()
asWellKnownQuantity
in class LinearUnit
protected java.lang.String persistableStringFor(java.lang.Number numericalValue)
persistableStringFor
in class LinearUnit
protected java.lang.String localizedFormatFor(java.lang.Number numericalValue, boolean useBreakingSpace, boolean allowCustomUnit)
localizedFormatFor
in class LinearUnit
public boolean equals(java.lang.Object other)
equals
in class LinearUnit
public int hashCode()
hashCode
in class LinearUnit