OwnT - the type of the own valueSubjectT - the type of the subject valuepublic class FormatConverter<OwnT,SubjectT> extends AbstractTypeConverter<OwnT,SubjectT> implements TypeConverter<OwnT,SubjectT>
| Constructor and Description |
|---|
FormatConverter(ValueModel<SubjectT> pSubject,
Format pFormat)
Create a new converter with the handed subject.
|
FormatConverter(ValueModel<SubjectT> pSubject,
Format pFormat,
boolean pInvert)
Create a new converter with the handed subject.
|
| Modifier and Type | Method and Description |
|---|---|
SubjectT |
convertOwnToSubjectValue(OwnT pOwnValue)
Converts from the type that this value model offers to the type
of the subject value model.
|
OwnT |
convertSubjectToOwnValue(SubjectT pSubjectValue)
Converts from the type that the subject value model provides
to the type this value model offers
|
dispose, getPropagateFailedConversions, getSubject, getSubjectValue, getSyncKey, getSyncMessage, getSyncState, getValue, getValue, isEditable, setPropagateFailedConversions, setSyncKey, setSyncMessage, setValue, stateChangedaddChangeListener, booleanValue, checkDisposed, doubleValue, fireStateChanged, floatValue, getDependents, getName, intValue, isDisposed, isInSetValue, isSetForced, longValue, onChangeSend, removeChangeListener, retractInterestsFor, setInSetValue, setName, setObjectValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueForced, signalExternalUpdate, stringValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSyncKey, getSyncMessage, getSyncState, setSyncKey, setSyncMessageaddChangeListener, booleanValue, dispose, doubleValue, floatValue, getDependents, getName, getValue, intValue, isDisposed, isEditable, isSetForced, longValue, onChangeSend, removeChangeListener, retractInterestsFor, setName, setObjectValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueForced, stringValuepublic FormatConverter(ValueModel<SubjectT> pSubject, Format pFormat, boolean pInvert)
pSubject - the ValueModel holding the original value, must not be nullpFormat - the format we should use for formatting/parsingpInvert - if this is true, we invert the conversionIllegalArgumentException - if pSubject or pFormat is nullpublic FormatConverter(ValueModel<SubjectT> pSubject, Format pFormat)
pSubject - the ValueModel holding the original value, must not be nullpFormat - the format we should use for formatting/parsingIllegalArgumentException - if pSubject or pFormat is nullpublic OwnT convertSubjectToOwnValue(SubjectT pSubjectValue) throws ConversionException
convertSubjectToOwnValue in interface TypeConverter<OwnT,SubjectT>pSubjectValue - value in the subject's typeConversionException - if we detected an error during the conversionpublic SubjectT convertOwnToSubjectValue(OwnT pOwnValue) throws ConversionException
convertOwnToSubjectValue in interface TypeConverter<OwnT,SubjectT>pOwnValue - value in this value model's typeConversionException - if we detected an error during the conversionCopyright © 2017 Jürgen Zeller (privat). All rights reserved.