pt.digitalis.dif.utils
Class ObjectFormatter
java.lang.Object
pt.digitalis.dif.utils.ObjectFormatter
public class ObjectFormatter
- extends Object
Helps to format an object for printing in human readable form
- Author:
- Pedro Viegas pviegas@digitalis.pt
- Created on:
- Dec 7, 2007
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectFormatter
public ObjectFormatter()
addItem
public ObjectFormatter addItem(String key,
Object value)
- Adds an item to the buffer
- Parameters:
key
- the key that identifies the valuevalue
- the value
- Returns:
- the updated instance (fluent interface)
addItemIfNotNull
public ObjectFormatter addItemIfNotNull(String key,
Object value)
- Adds an item to the buffer if the value is not null
- Parameters:
key
- the key that identifies the valuevalue
- the value
- Returns:
- the updated instance (fluent interface)
getFormatedObject
public String getFormatedObject()
- Returns:
- the formatted object
Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.