/** * Concatenate the joiner text and the text to the text of this {@link org.apache.isis.applib.util.TitleBuffer} * object. If no text yet exists in the object then the joiner text is * omitted. * * @return a reference to the called object (itself). */ public TitleBuffer concat(final String joiner, final String text) { if (!isEmpty(text)) { appendJoiner(joiner); title.append(text); } return this; }
/** * Concatenate the joiner text and the text to the text of this TitleString * object. If no text yet exists in the object then the joiner text is * omitted. * * @return a reference to the called object (itself). */ public TitleBuffer concat(final String joiner, final String text) { if (!isEmpty(text)) { appendJoiner(joiner); title.append(text); } return this; }
/** * Concatenate the joiner text and the title of the object to the text of * this TitleString object. If no object yet exists in the object then * defaultValue is used instead. * * @return a reference to the called object (itself). */ public final TitleBuffer concat(final String joiner, final Object object, final String defaultValue) { if (isEmpty(object)) { appendJoiner(joiner); title.append(defaultValue); } else { appendJoiner(joiner); title.append(titleFor(object)); } return this; }
/** * Concatenate the joiner text and the title of the object to the text of * this {@link org.apache.isis.applib.util.TitleBuffer} object. If no object yet exists in the object then * defaultValue is used instead. * * <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> * @return a reference to the called object (itself). */ public final TitleBuffer concat(final String joiner, final Object object, final String defaultValue) { String title = titleFor(object); if (isEmpty(title)) { appendJoiner(joiner); this.title.append(defaultValue); } else { appendJoiner(joiner); this.title.append(title); } 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; }
/** * 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; }
/** * Concatenate the joiner text and the title of the object to the text of * this TitleString object. If no object yet exists in the object then the * joiner text is omitted. * * @return a reference to the called object (itself). */ public final TitleBuffer concat(final String joiner, final Object object) { if (!isEmpty(object)) { appendJoiner(joiner); concat(object, ""); } return this; }
/** * 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; }
/** * Concatenate the joiner text and the title of the object to the text of * this {@link org.apache.isis.applib.util.TitleBuffer}. If no object yet exists in the object then the * joiner text is omitted. * * <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> * * @return a reference to the called object (itself). */ public final TitleBuffer concat(final String joiner, final Object object) { String title = titleFor(object); if (!isEmpty(title)) { appendJoiner(joiner); concat(title, ""); } 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; }
appendJoiner(joiner); String title = titleFor(object); if (!isEmpty(title)) {