/** * Appends the title of the specified object, or the specified text if the * objects title is null or empty. Prepends a space if there is already some * text in this title object. * * @param object * the object whose title is to be appended to this title. * @param defaultValue * a textual value to be used if the object's title is null or * empty. * @return a reference to the called object (itself). */ public TitleBuffer append(final Object object, final String defaultValue) { if (!isEmpty(object)) { appendWithSpace(object); } else { appendWithSpace(defaultValue); } return this; }
/** * Appends a space (if there is already some text in this title object) and * then the specified text. * * @return a reference to the called object (itself). */ public TitleBuffer append(final String text) { if (!isEmpty(text)) { appendWithSpace(text); } return this; }
/** * Append the title of the specified object. */ public TitleBuffer append(final Object object) { if (!isEmpty(object)) { appendWithSpace(object); } return this; }
/** * Appends a space (if there is already some text in this title object) and * then the specified text. * * @return a reference to the called object (itself). */ public TitleBuffer append(final String text) { if (!isEmpty(text)) { appendWithSpace(text); } return this; }
/** * Append the <code>joiner</code> text, a space, and the title of the * specified ObjectAdapter (<code>object</code>) (got by calling the objects * title() method) to the text of this TitleString object. If the title of * the specified object is null then use the <code>defaultValue</code> text. * If both the objects title and the default value are null or equate to a * zero-length string then no text will be appended ; not even the joiner * text. * * @param joiner * text to append before the title * @param object * object whose title needs to be appended * @param defaultTitle * the text to use if the the object's title is null. * @return a reference to the called object (itself). */ public TitleBuffer append(final String joiner, final Object object, final String defaultTitle) { appendJoiner(joiner); if (!isEmpty(object)) { appendWithSpace(object); } else { appendWithSpace(defaultTitle); } return this; }
/** * Appends the title of the specified object, or the specified text if the * objects title is null or empty. Prepends a space if there is already some * text in this title object. * * <p> * Note: this method only obtains the title using either <tt>title()</tt> or <tt>toString()</tt>; it doesn't * honour other mechanisms for specifying the title, such as {@link org.apache.isis.applib.annotation.Title} * annotation. If that functionality is required, first call * {@link org.apache.isis.applib.DomainObjectContainer#titleOf(Object)} on the object and pass in the resultant * string. * </p> * * @param object * the object whose title is to be appended to this title. * @param defaultValue * a textual value to be used if the object's title is null or * empty. * @return a reference to the called object (itself). */ public TitleBuffer append(final Object object, final String defaultValue) { String title = titleFor(object); if (!isEmpty(title)) { appendWithSpace(title); } else { appendWithSpace(defaultValue); } return this; }
/** * Appends the joining string and the title of the specified object (from * its <code>toString</code> method). If the object is empty then nothing * will be appended. * * @see #isEmpty(Object) */ public TitleBuffer append(final String joiner, final Object object) { if (!isEmpty(object)) { appendJoiner(joiner); appendWithSpace(object); } return this; }
/** * Appends the joiner text, a space, and the text to the text of this * TitleString object. If no text yet exists in the object then the joiner * text and space are omitted. * * @return a reference to the called object (itself). */ public TitleBuffer append(final String joiner, final String text) { if (!isEmpty(text)) { appendJoiner(joiner); appendWithSpace(text); } return this; }
/** * Appends the joiner text, a space, and the text to the text of this * {@link org.apache.isis.applib.util.TitleBuffer}. If no text yet exists in the object then the joiner * text and space are omitted. * * @return a reference to the called object (itself). */ public TitleBuffer append(final String joiner, final String text) { if (!isEmpty(text)) { appendJoiner(joiner); appendWithSpace(text); } return this; }
/** * Append the title of the specified object to this {@link org.apache.isis.applib.util.TitleBuffer}. * * <p> * Note: this method only obtains the title using either <tt>title()</tt> or <tt>toString()</tt>; it doesn't * honour other mechanisms for specifying the title, such as {@link org.apache.isis.applib.annotation.Title} * annotation. If that functionality is required, first call * {@link org.apache.isis.applib.DomainObjectContainer#titleOf(Object)} on the object and pass in the resultant * string. * </p> */ public TitleBuffer append(final Object object) { String title = titleFor(object); if (!isEmpty(title)) { appendWithSpace(title); } return this; }
String title = titleFor(object); if (!isEmpty(title)) { appendWithSpace(title); } else { appendWithSpace(defaultTitle);
/** * Appends the joining string and the title of the specified object. If the object is empty then nothing * will be appended. * * <p> * Note: this method only obtains the title using either <tt>title()</tt> or <tt>toString()</tt>; it doesn't * honour other mechanisms for specifying the title, such as {@link org.apache.isis.applib.annotation.Title} * annotation. If that functionality is required, first call * {@link org.apache.isis.applib.DomainObjectContainer#titleOf(Object)} on the object and pass in the resultant * string. * </p> * * @see #isEmpty(Object) */ public TitleBuffer append(final String joiner, final Object object) { String title = titleFor(object); if (!isEmpty(title)) { appendJoiner(joiner); appendWithSpace(title); } return this; }