T - - type of object to append.@ParametersAreNonnullByDefault @FunctionalInterface public interface ObjectAppender<T> extends BiConsumer<T,Appendable>
| Modifier and Type | Field and Description |
|---|---|
static ObjectAppender<Object> |
TOSTRING_APPENDER
A simple Object appender that invokes the toString method of the object and writes the object out.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
accept(T object,
Appendable appendTo) |
void |
append(T object,
Appendable appendTo)
Write an Object to a char stream.
|
default void |
append(T object,
Appendable appendTo,
ObjectAppenderSupplier appenderSupplier)
Method to overwrite for implementing apenders for container objects.
|
static void |
appendNullable(Object o,
Appendable appendTo,
ObjectAppenderSupplier appenderSupplier) |
static void |
appendNullableJson(Object o,
Appendable appendTo,
ObjectAppenderSupplier appenderSupplier) |
default CoreTextMediaType |
getAppendedType()
the MimeType of the format used to write the Object.
|
default String |
toString(T object) |
andThenstatic final ObjectAppender<Object> TOSTRING_APPENDER
default CoreTextMediaType getAppendedType()
void append(T object, Appendable appendTo) throws IOException
object - appendTo - IOExceptionstatic void appendNullable(@Nullable Object o, Appendable appendTo, ObjectAppenderSupplier appenderSupplier) throws IOException
IOExceptionstatic void appendNullableJson(@Nullable Object o, Appendable appendTo, ObjectAppenderSupplier appenderSupplier) throws IOException
IOExceptiondefault void append(T object, Appendable appendTo, ObjectAppenderSupplier appenderSupplier) throws IOException
IOExceptiondefault void accept(T object, Appendable appendTo)
accept in interface BiConsumer<T,Appendable>Copyright © 2021 SPF4J. All rights reserved.