Class TLcyCompositePropertyConverter
- All Implemented Interfaces:
ILcyPropertyConverter
Composite implementation of ILcyPropertyConverter. It has a list of associated
ILcyPropertyConverters, which are all used.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyConverter(ILcyPropertyConverter aConverter) Adds the givenILcyPropertyConverterto this composite implementation.voidconvertAfterDecode(ALcyProperties aPropertiesSFCT) Modifies the givenALcyPropertiesso thatStringproperties representingObjects are converted to theseObjects.voidconvertBeforeEncode(ALcyProperties aPropertiesSFCT) Modifies the givenALcyPropertiesso that allObjectvalues are converted to one or moreStringvalues.getPropertyConverter(int aIndex) Returns theILcyPropertyConverterat the given index.intReturns the amount of associatedILcyPropertyConverters.voidremovePropertyConverter(ILcyPropertyConverter aConverter) Remove the givenILcyPropertyConverterfrom this composite implementation.
-
Constructor Details
-
TLcyCompositePropertyConverter
public TLcyCompositePropertyConverter()
-
-
Method Details
-
addPropertyConverter
Adds the givenILcyPropertyConverterto this composite implementation.- Parameters:
aConverter- theILcyPropertyConverterto add. Must not benull.- Throws:
IllegalArgumentException- If the specified converter was already added before.NullPointerException- If the specified converter wasnull.
-
removePropertyConverter
Remove the given
ILcyPropertyConverterfrom this composite implementation. If this composite converter did not contain the specified converter, no exception is thrown and nothing else happens.- Parameters:
aConverter- theILcyPropertyConverterto remove.
-
getPropertyConverter
Returns theILcyPropertyConverterat the given index.- Parameters:
aIndex- the index to retrieve theILcyPropertyConverterfor. 0 < aIndex <getPropertyConverterCount()- Returns:
- the
ILcyPropertyConverterat the given index.
-
getPropertyConverterCount
public int getPropertyConverterCount()Returns the amount of associatedILcyPropertyConverters.- Returns:
- the amount of associated
ILcyPropertyConverters. - See Also:
-
convertBeforeEncode
Modifies the given
ALcyPropertiesso that allObjectvalues are converted to one or moreStringvalues.This method should remove the original
Objectthat it encodes. Only theStringproperty or properties should remain.This implementation performs the conversion by asking all associated
ILcyPropertyConverters to perform their conversions.- Specified by:
convertBeforeEncodein interfaceILcyPropertyConverter- Parameters:
aPropertiesSFCT- TheALcyPropertiesto modify. Nevernull.
-
convertAfterDecode
Modifies the given
ALcyPropertiesso thatStringproperties representingObjects are converted to theseObjects.This method should remove the
Stringproperties from which it constructs theObject. Only theObjectproperty should remain.This implementation performs the conversion by asking all associated
ILcyPropertyConverters to perform their conversions.- Specified by:
convertAfterDecodein interfaceILcyPropertyConverter- Parameters:
aPropertiesSFCT- The properties to modify.
-