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:
java.lang.Comparable<LinearUnit>,IUnit
- Enclosing class:
- LinearUnit
protected static class LinearUnit.Custom extends LinearUnit
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openjdk.jmc.common.unit.LinearUnit
LinearUnit.Custom
-
Nested classes/interfaces inherited from class org.openjdk.jmc.common.unit.TypedUnit
TypedUnit.UnitSelector<U extends TypedUnit<U>>
-
-
Field Summary
Fields Modifier and Type Field Description private LinearUnitdefinitionUnitprivate ScaleFactorfactorToDefinition-
Fields inherited from interface org.openjdk.jmc.common.unit.IUnit
EMPTY_STRING_ARRAY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCustom(LinearKindOfQuantity kindOfQuantity, java.lang.String unitId, ScaleFactor factorToDefinition, LinearUnit definitionUnit, java.lang.String unitSymbol, java.lang.String unitDesc, java.lang.String... altNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ITypedQuantity<LinearUnit>asWellKnownQuantity()booleanequals(java.lang.Object other)inthashCode()protected booleanisCustom()protected java.lang.StringlocalizedFormatFor(java.lang.Number numericalValue, boolean useBreakingSpace, boolean allowCustomUnit)protected java.lang.StringpersistableStringFor(java.lang.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, valueTransformTo
-
Methods inherited from class org.openjdk.jmc.common.unit.TypedUnit
addPossiblyIntegral, quantity, valueTransformTo
-
-
-
-
Field Detail
-
factorToDefinition
private final ScaleFactor factorToDefinition
-
definitionUnit
private final LinearUnit definitionUnit
-
-
Constructor Detail
-
Custom
protected Custom(LinearKindOfQuantity kindOfQuantity, java.lang.String unitId, ScaleFactor factorToDefinition, LinearUnit definitionUnit, java.lang.String unitSymbol, java.lang.String unitDesc, java.lang.String... altNames)
-
-
Method Detail
-
isCustom
protected boolean isCustom()
- Overrides:
isCustomin classLinearUnit
-
asWellKnownQuantity
public ITypedQuantity<LinearUnit> asWellKnownQuantity()
- Overrides:
asWellKnownQuantityin classLinearUnit- Returns:
- a quantity with the same magnitude as this unit, defined in a non-custom unit (possibly itself)
-
persistableStringFor
protected java.lang.String persistableStringFor(java.lang.Number numericalValue)
- Overrides:
persistableStringForin classLinearUnit
-
localizedFormatFor
protected java.lang.String localizedFormatFor(java.lang.Number numericalValue, boolean useBreakingSpace, boolean allowCustomUnit)- Overrides:
localizedFormatForin classLinearUnit
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classLinearUnit
-
hashCode
public int hashCode()
- Overrides:
hashCodein classLinearUnit
-
-