wt.eff.format
Class NumericUnitEffFormat

java.lang.Object
  extended by wt.eff.format.AbstractEffFormat
      extended by wt.eff.format.UnitEffFormat
          extended by wt.eff.format.NumericUnitEffFormat
All Implemented Interfaces:
Externalizable, Serializable, EffFormat

public class NumericUnitEffFormat
extends UnitEffFormat
implements Externalizable

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:

Effectivity formats in this package are driven by parameters that dictate operations they support. See the Windchill Customizer's Guide for explanation on how to specify the format a traceable business object supports along with the parameters it accepts.


Supported API: true

Extendable: true

Since:
Windchill 9.0
See Also:
UnitEffFormat, EffFormat, EffFormatService, Serialized Form

Method Summary
 String addToRangeValue(String rangeValue, int amount, EffState state, Map<String,String> formatParams)
          Assumes the range value passed is already validated against this format.
 int compareRangeValues(String leftValue, String rightValue, EffState state, Map<String,String> formatParams)
          Assumes the range value passed is already validated against this format.
 String getDisplayDescription(Locale locale)
          

Supported API: true
 String getDisplayName(Locale locale)
          

Supported API: true
 boolean supportsRangeArithmetic()
          

Supported API: true
 String validateRangeValue(String rangeValue, EffState state, Map<String,String> formatParams, boolean isStartRange)
          

Supported API: true
 
Methods inherited from class wt.eff.format.AbstractEffFormat
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getDisplayName

public String getDisplayName(Locale locale)


Supported API: true

Specified by:
getDisplayName in interface EffFormat
Parameters:
locale -
Returns:
String
See Also:
wt.eff.format#getDisplayDescription()

getDisplayDescription

public String getDisplayDescription(Locale locale)


Supported API: true

Specified by:
getDisplayDescription in interface EffFormat
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:
validateRangeValue in interface EffFormat
Parameters:
rangeValue -
state -
formatParams -
isStartRange -
Returns:
String

compareRangeValues

public int compareRangeValues(String leftValue,
                              String rightValue,
                              EffState state,
                              Map<String,String> formatParams)
                       throws EffFormatException
Assumes the range value passed is already validated against this format.

Supported API: true

Specified by:
compareRangeValues in interface EffFormat
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:
supportsRangeArithmetic in interface EffFormat
Returns:
boolean
See Also:
#addToRangeValue(String, int, EffState, java.util.Map{@literal })

addToRangeValue

public String addToRangeValue(String rangeValue,
                              int amount,
                              EffState state,
                              Map<String,String> formatParams)
                       throws EffFormatException
Assumes the range value passed is already validated against this format.

Supported API: true

Specified by:
addToRangeValue in interface EffFormat
Overrides:
addToRangeValue in class AbstractEffFormat
Parameters:
rangeValue -
amount -
state -
formatParams -
Returns:
String
Throws:
NumberFormatException - if the string does not contain a parsable integer.
EffFormatException
See Also:
EffFormat.supportsRangeArithmetic()