Package com.helger.commons.format
Class FormatableObject<DATATYPE>
java.lang.Object
com.helger.commons.format.FormatableObject<DATATYPE>
- Type Parameters:
DATATYPE- Data type to be formatted
- All Implemented Interfaces:
IFormatableObject<DATATYPE>
@NotThreadSafe
public class FormatableObject<DATATYPE>
extends Object
implements IFormatableObject<DATATYPE>
This class represents a single object with an additional formatter.
- Author:
- Philip Helger
-
Constructor Summary
ConstructorsConstructorDescriptionFormatableObject(DATATYPE aValue, Function<? super DATATYPE, ? extends String> aFormatter) Init the field with a value. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.commons.format.IFormatableObject
getAsString
-
Constructor Details
-
Method Details
-
getValue
Description copied from interface:IFormatableObjectGet the original value.- Specified by:
getValuein interfaceIFormatableObject<DATATYPE>- Returns:
- The unformatted value. May be
null.
-
getFormatter
- Specified by:
getFormatterin interfaceIFormatableObject<DATATYPE>- Returns:
- The formatter to be used for formatting this object. Never
null.
-
equals
-
hashCode
public int hashCode() -
toString
-