Package wt.eff.format
Class DefaultUnitEffFormat
java.lang.Object
wt.eff.format.AbstractEffFormat
wt.eff.format.UnitEffFormat
wt.eff.format.DefaultUnitEffFormat
- All Implemented Interfaces:
Externalizable,Serializable,EffFormat
This format represents the default format for unit effectivity statements
if no other effectivity format is supplied and thus acts like a placeholder.
Since it is unaware of the actual format of effectivity statements, it
provides rudimentary implementations of the various format-related operations.
This format accepts the following configurable parameters:
The only parameter this format supports is the length of effectivity range values.
Use this effectivity format, if you do not intend to take advantage of any of the format-related capabilities like range value validation, comparisons and range arithmetic.
Supported API: true
Extendable: true
This format accepts the following configurable parameters:
- length
- Description: Enforces effectivity statements adhering to this format, to have a fixed length.
- Type: Positive Integer (Number).
- Special Values: 0. This value states that the effectivity range values do not have a fixed length.
- Required: No (If not specified, range values can have an arbitrary length)
- Default: 0
- Examples: 3, 6, 8.
- contains-whitespace
- Description: Specifies whether effectivity range values contain space(s).
- Type: Boolean.
- Required: No (If not specified range values can contain space characters)
- Default: true. Allows spaces to be part of the effectivity range values.
- Other values: false. Does not allow spaces to be part of effectivity range values.
The only parameter this format supports is the length of effectivity range values.
Use this effectivity format, if you do not intend to take advantage of any of the format-related capabilities like range value validation, comparisons and range arithmetic.
Supported API: true
Extendable: true
- Since:
- Windchill 9.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintcompareRangeValues(String leftValue, String rightValue, EffState state, Map<String, String> formatParams) This operation uses the java.lang.String's compareTo() method for implementing comparisons, which performs a lexicographical comparison based on the Unicode value of each character in the strings.getDisplayDescription(Locale locale)
Supported API: truegetDisplayName(Locale locale)
Supported API: truevalidateRangeValue(String rangeValue, EffState state, Map<String, String> formatParams, boolean isStartRange)
Supported API: trueMethods inherited from class wt.eff.format.AbstractEffFormat
addToRangeValue, 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 EffFormatExceptionThis operation uses the java.lang.String's compareTo() method for implementing comparisons, which performs a lexicographical comparison based on the Unicode value of each character in the strings. See the description ofString.compareTo(String)for more details of the comparison algorithm.
Supported API: true- Specified by:
compareRangeValuesin interfaceEffFormat- Parameters:
leftValue-rightValue-state-formatParams-- Returns:
- int
- Throws:
EffFormatException- See Also:
-