Package wt.eff.format
Class NumericUnitEffFormat
java.lang.Object
wt.eff.format.AbstractEffFormat
wt.eff.format.UnitEffFormat
wt.eff.format.NumericUnitEffFormat
- All Implemented Interfaces:
Externalizable,Serializable,EffFormat
This format supports fixed-length (max. length of 18) effectivity statements
consisting of only numerical digits (0-9).
Use this format if your unit effectivity statements consist of only numbers and have a fixed length. This format implements the various comparisons and range arithmetic logic by converting the range value to an equivalent number. Hence all range value characters must be digits (0-9)
This format accepts the following configurable parameters:
Supported API: true
Extendable: true
Use this format if your unit effectivity statements consist of only numbers and have a fixed length. This format implements the various comparisons and range arithmetic logic by converting the range value to an equivalent number. Hence all range value characters must be digits (0-9)
This format accepts the following configurable parameters:
- length
- Description: Enforces effectivity statements adhering to this format, to have a fixed length. This format supports a maximum length of 18 digits.
- Type: Positive Integer (Number), less than 18.
- Special Values: 0. This value states that the effectivity range values do not have a fixed length.
- Required: Yes
- Default: N/A
- Examples: 3, 6, 8.
Supported API: true
Extendable: true
- Since:
- Windchill 9.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionAssumes the range value passed is already validated against this format.intcompareRangeValues(String leftValue, String rightValue, EffState state, Map<String, String> formatParams) Assumes the range value passed is already validated against this format.getDisplayDescription(Locale locale)
Supported API: truegetDisplayName(Locale locale)
Supported API: trueboolean
Supported API: truevalidateRangeValue(String rangeValue, EffState state, Map<String, String> formatParams, boolean isStartRange)
Supported API: trueMethods inherited from class wt.eff.format.AbstractEffFormat
toString
-
Method Details
-
getDisplayName
Supported API: true- Specified by:
getDisplayNamein interfaceEffFormat- Parameters:
locale-- Returns:
- String
- See Also:
-
wt.eff.format#getDisplayDescription()
-
getDisplayDescription
Supported API: true- Specified by:
getDisplayDescriptionin interfaceEffFormat- Parameters:
locale-- Returns:
- String
- See Also:
-
wt.eff.format#getDisplayName()
-
validateRangeValue
public String validateRangeValue(String rangeValue, EffState state, Map<String, String> formatParams, boolean isStartRange)
Supported API: true- Specified by:
validateRangeValuein interfaceEffFormat- Parameters:
rangeValue-state-formatParams-isStartRange-- Returns:
- String
-
compareRangeValues
public int compareRangeValues(String leftValue, String rightValue, EffState state, Map<String, String> formatParams) throws EffFormatExceptionAssumes the range value passed is already validated against this format.
Supported API: true- Specified by:
compareRangeValuesin interfaceEffFormat- Parameters:
leftValue-rightValue-state-formatParams-- Returns:
- int
- Throws:
NumberFormatException- if the string does not contain a parsable integer.EffFormatException
-
supportsRangeArithmetic
public boolean supportsRangeArithmetic()
Supported API: true- Specified by:
supportsRangeArithmeticin interfaceEffFormat- Overrides:
supportsRangeArithmeticin classAbstractEffFormat- Returns:
- boolean
-
addToRangeValue
public String addToRangeValue(String rangeValue, int amount, EffState state, Map<String, String> formatParams) throws EffFormatExceptionAssumes the range value passed is already validated against this format.
Supported API: true- Specified by:
addToRangeValuein interfaceEffFormat- Overrides:
addToRangeValuein classAbstractEffFormat- Parameters:
rangeValue-amount-state-formatParams-- Returns:
- String
- Throws:
NumberFormatException- if the string does not contain a parsable integer.EffFormatException- See Also:
-