public class NumericalFormatter extends MultiContextDocumentProcessor implements com.exalead.util.Checkable, java.io.Serializable
MultiContextDocumentProcessor.InputContexts, MultiContextDocumentProcessor.Transformer<T>
DocumentProcessor.FromDataModel
Modifier and Type | Field and Description |
---|---|
java.lang.String |
decimalSeparator |
static java.lang.String |
DEFAULT_DECIMAL_SEPARATOR |
static int |
DEFAULT_PRECISION |
static boolean |
DEFAULT_REMOVE_TRAILING_ZEROS |
static int |
DEFAULT_ROUND |
java.lang.String |
groupSeparator |
java.lang.String |
outputContext |
int |
precision |
boolean |
removeTrailingZeros |
int |
round |
inputContexts
acceptCondition, dataModelClass, dataModelProperty, dataModelState, DEFAULT_DISABLED, disabled, fromDataModel, name
Constructor and Description |
---|
NumericalFormatter() |
NumericalFormatter(NumericalFormatter o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(DocumentProcessor.Transformer<T> transformer,
T[] t) |
<T> T |
accept(MultiContextDocumentProcessor.Transformer<T> transformer,
T[] t) |
void |
check(boolean deep,
java.lang.String errorContext)
Checks this NumericalFormatter.
|
static NumericalFormatter |
fromString(java.lang.String s)
String representation of this NumericalFormatter.
|
java.lang.String |
getDecimalSeparator()
decimal separator
|
java.lang.String |
getGroupSeparator()
group separator
|
java.lang.String |
getOutputContext()
The ContextName used for the newly created chunk.
If null, it uses the same name as the input. |
int |
getPrecision()
Number of digits relevant in the decimal part.
|
int |
getRound()
Rounds the integer part with this range.
|
boolean |
isRemoveTrailingZeros()
Removes the trailing zeros in the decimal part.
|
NumericalFormatter |
makeCopy()
Creates and returns a deep copy of this NumericalFormatter.
|
static NumericalFormatter |
readFrom(java.io.InputStream is)
Read this NumericalFormatter from an XML fragment.
|
void |
setDecimalSeparator(java.lang.String decimalSeparator)
decimal separator
|
void |
setGroupSeparator(java.lang.String groupSeparator)
group separator
|
void |
setOutputContext(java.lang.String outputContext)
The ContextName used for the newly created chunk.
If null, it uses the same name as the input. |
void |
setPrecision(int precision)
Number of digits relevant in the decimal part.
|
void |
setRemoveTrailingZeros(boolean removeTrailingZeros)
Removes the trailing zeros in the decimal part.
|
void |
setRound(int round)
Rounds the integer part with this range.
|
java.lang.String |
toString()
String representation of this NumericalFormatter.
|
NumericalFormatter |
withAcceptCondition(AcceptCondition acceptCondition) |
NumericalFormatter |
withDataModelClass(java.lang.String dataModelClass) |
NumericalFormatter |
withDataModelProperty(java.lang.String dataModelProperty) |
NumericalFormatter |
withDataModelState(java.lang.String dataModelState) |
NumericalFormatter |
withDecimalSeparator(java.lang.String decimalSeparator) |
NumericalFormatter |
withDisabled(boolean disabled) |
NumericalFormatter |
withDisabled(java.lang.Boolean disabled) |
NumericalFormatter |
withFromDataModel(DocumentProcessor fromDataModel) |
NumericalFormatter |
withGroupSeparator(java.lang.String groupSeparator) |
NumericalFormatter |
withInputContexts(java.util.Collection<StringValue> __values) |
NumericalFormatter |
withInputContexts(StringValue... __values)
The processor will only be applied to DocumentChunks with a ContextName specified in this list.
|
NumericalFormatter |
withName(java.lang.String name) |
NumericalFormatter |
withOutputContext(java.lang.String outputContext) |
NumericalFormatter |
withPrecision(int precision) |
NumericalFormatter |
withPrecision(java.lang.Integer precision) |
NumericalFormatter |
withRemoveTrailingZeros(boolean removeTrailingZeros) |
NumericalFormatter |
withRemoveTrailingZeros(java.lang.Boolean removeTrailingZeros) |
NumericalFormatter |
withRound(int round) |
NumericalFormatter |
withRound(java.lang.Integer round) |
void |
writeTo(java.io.OutputStream os)
Write this NumericalFormatter as an XML fragment
|
getInputContexts, setInputContexts, withInputContexts
getAcceptCondition, getDataModelClass, getDataModelProperty, getDataModelState, getFromDataModel, getName, isDisabled, setAcceptCondition, setDataModelClass, setDataModelProperty, setDataModelState, setDisabled, setFromDataModel, setName
public java.lang.String outputContext
public int precision
public static final int DEFAULT_PRECISION
public int round
public static final int DEFAULT_ROUND
public boolean removeTrailingZeros
public static final boolean DEFAULT_REMOVE_TRAILING_ZEROS
public java.lang.String groupSeparator
public java.lang.String decimalSeparator
public static final java.lang.String DEFAULT_DECIMAL_SEPARATOR
public NumericalFormatter()
public NumericalFormatter(NumericalFormatter o)
public NumericalFormatter withInputContexts(StringValue... __values)
withInputContexts
in class MultiContextDocumentProcessor
public NumericalFormatter withInputContexts(java.util.Collection<StringValue> __values)
withInputContexts
in class MultiContextDocumentProcessor
public NumericalFormatter withAcceptCondition(AcceptCondition acceptCondition)
withAcceptCondition
in class MultiContextDocumentProcessor
public NumericalFormatter withName(java.lang.String name)
withName
in class MultiContextDocumentProcessor
public NumericalFormatter withDataModelState(java.lang.String dataModelState)
withDataModelState
in class MultiContextDocumentProcessor
public NumericalFormatter withFromDataModel(DocumentProcessor fromDataModel)
withFromDataModel
in class MultiContextDocumentProcessor
public NumericalFormatter withDataModelClass(java.lang.String dataModelClass)
withDataModelClass
in class MultiContextDocumentProcessor
public NumericalFormatter withDataModelProperty(java.lang.String dataModelProperty)
withDataModelProperty
in class MultiContextDocumentProcessor
public NumericalFormatter withDisabled(boolean disabled)
withDisabled
in class MultiContextDocumentProcessor
public NumericalFormatter withDisabled(java.lang.Boolean disabled)
withDisabled
in class MultiContextDocumentProcessor
public void setOutputContext(java.lang.String outputContext)
public java.lang.String getOutputContext()
public NumericalFormatter withOutputContext(java.lang.String outputContext)
public void setPrecision(int precision)
public int getPrecision()
public NumericalFormatter withPrecision(int precision)
public NumericalFormatter withPrecision(java.lang.Integer precision)
public void setRound(int round)
public int getRound()
public NumericalFormatter withRound(int round)
public NumericalFormatter withRound(java.lang.Integer round)
public void setRemoveTrailingZeros(boolean removeTrailingZeros)
public boolean isRemoveTrailingZeros()
public NumericalFormatter withRemoveTrailingZeros(boolean removeTrailingZeros)
public NumericalFormatter withRemoveTrailingZeros(java.lang.Boolean removeTrailingZeros)
public void setGroupSeparator(java.lang.String groupSeparator)
public java.lang.String getGroupSeparator()
public NumericalFormatter withGroupSeparator(java.lang.String groupSeparator)
public void setDecimalSeparator(java.lang.String decimalSeparator)
public java.lang.String getDecimalSeparator()
public NumericalFormatter withDecimalSeparator(java.lang.String decimalSeparator)
public NumericalFormatter makeCopy()
makeCopy
in class MultiContextDocumentProcessor
public static NumericalFormatter readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
writeTo
in class MultiContextDocumentProcessor
javax.xml.bind.JAXBException
java.io.IOException
public static NumericalFormatter fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
toString
in class MultiContextDocumentProcessor
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
check
in class MultiContextDocumentProcessor
com.exalead.util.TypedException
public <T> T accept(MultiContextDocumentProcessor.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
accept
in class MultiContextDocumentProcessor
com.exalead.util.TypedException
public <T> T accept(DocumentProcessor.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
accept
in class DocumentProcessor
com.exalead.util.TypedException
Copyright © 2021 Dassault Systèmes, All Rights Reserved.