Package com.csse3200.game.utils
Class StringDecorator<T>
java.lang.Object
com.csse3200.game.utils.StringDecorator<T>
- Type Parameters:
T
- Class to decorate
Apply a custom toString() for a class without overriding the class, using a decorator.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionStringDecorator
(T object, Function<T, String> printFn) Create a string-decorated object. -
Method Summary