Package com.helger.commons.error
Class ErrorTextProvider.FormattableItem
java.lang.Object
com.helger.commons.error.ErrorTextProvider.FormattableItem
- All Implemented Interfaces:
ErrorTextProvider.IFormattableItem
- Enclosing class:
ErrorTextProvider
@Immutable
public static class ErrorTextProvider.FormattableItem
extends Object
implements ErrorTextProvider.IFormattableItem
Default placeholder based implementation of
ErrorTextProvider.IFormattableItem.- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ErrorTextProvider.EFieldgetField()getFormattedText(String sReplacement) Return a formatted version ofErrorTextProvider.IFormattableItem.getUnformattedText()by replacing allErrorTextProvider.PLACEHOLDERchars with the provided replacement.toString()
-
Constructor Details
-
FormattableItem
-
-
Method Details
-
getField
- Specified by:
getFieldin interfaceErrorTextProvider.IFormattableItem- Returns:
- the error field this is about. Never
null.
-
getUnformattedText
- Specified by:
getUnformattedTextin interfaceErrorTextProvider.IFormattableItem- Returns:
- The unformatted text. Never
null.
-
getFormattedText
Description copied from interface:ErrorTextProvider.IFormattableItemReturn a formatted version ofErrorTextProvider.IFormattableItem.getUnformattedText()by replacing allErrorTextProvider.PLACEHOLDERchars with the provided replacement.- Specified by:
getFormattedTextin interfaceErrorTextProvider.IFormattableItem- Parameters:
sReplacement- The replacement string. Must not benull.- Returns:
- The formatted text with the replacement applied.
-
toString
-