Package org.openjdk.jmc.common.unit
Class LinearUnit.Custom
java.lang.Object
org.openjdk.jmc.common.unit.TypedUnit<LinearUnit>
org.openjdk.jmc.common.unit.LinearUnit
org.openjdk.jmc.common.unit.LinearUnit.Custom
- All Implemented Interfaces:
Comparable<LinearUnit>,IUnit
- Enclosing class:
- LinearUnit
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openjdk.jmc.common.unit.LinearUnit
LinearUnit.CustomNested classes/interfaces inherited from class org.openjdk.jmc.common.unit.TypedUnit
TypedUnit.UnitSelector<U extends TypedUnit<U>> -
Field Summary
Fields inherited from interface org.openjdk.jmc.common.unit.IUnit
EMPTY_STRING_ARRAY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCustom(LinearKindOfQuantity kindOfQuantity, String unitId, ScaleFactor factorToDefinition, LinearUnit definitionUnit, String unitSymbol, String unitDesc, String... altNames) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()protected booleanisCustom()protected StringlocalizedFormatFor(Number numericalValue, boolean useBreakingSpace, boolean allowCustomUnit) protected StringpersistableStringFor(Number numericalValue) Methods inherited from class org.openjdk.jmc.common.unit.LinearUnit
add, compareTo, customParseInteractive, floorQuantize, floorQuantize, getAltLocalizedNames, getAppendableSuffix, getContentType, getDeltaUnit, getIdentifier, getLocalizedDescription, getLocalizedSymbol, getScaledUnit, getUnitClass, isLinear, quantity, quantity, subtractSame, toString, valueTransformToMethods inherited from class org.openjdk.jmc.common.unit.TypedUnit
addPossiblyIntegral, quantity, valueTransformTo
-
Constructor Details
-
Custom
protected Custom(LinearKindOfQuantity kindOfQuantity, String unitId, ScaleFactor factorToDefinition, LinearUnit definitionUnit, String unitSymbol, String unitDesc, String... altNames)
-
-
Method Details
-
isCustom
protected boolean isCustom()- Overrides:
isCustomin classLinearUnit
-
asWellKnownQuantity
- Overrides:
asWellKnownQuantityin classLinearUnit- Returns:
- a quantity with the same magnitude as this unit, defined in a non-custom unit (possibly itself)
-
persistableStringFor
- Overrides:
persistableStringForin classLinearUnit
-
localizedFormatFor
protected String localizedFormatFor(Number numericalValue, boolean useBreakingSpace, boolean allowCustomUnit) - Overrides:
localizedFormatForin classLinearUnit
-
equals
- Overrides:
equalsin classLinearUnit
-
hashCode
public int hashCode()- Overrides:
hashCodein classLinearUnit
-