/** * Appends {@code double} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final double value) { appendAttribute(name, String.valueOf(value)); return this; }
/** * Appends {@code float[]} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final float[] value) { appendAttribute(name, Arrays.toString(value)); return this; }
/** * Appends {@code boolean[]} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final boolean[] value) { appendAttribute(name, Arrays.toString(value)); return this; }
/** * Appends {@code char[]} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final char[] value) { appendAttribute(name, Arrays.toString(value)); return this; }
/** * Appends {@code short} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final short value) { appendAttribute(name, String.valueOf(value)); return this; }
/** * Appends {@code short[]} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final short[] value) { appendAttribute(name, Arrays.toString(value)); return this; }
/** * Appends {@code boolean} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final boolean value) { appendAttribute(name, String.valueOf(value)); return this; }
/** * Appends {@code byte} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final byte value) { appendAttribute(name, String.valueOf(value)); return this; }
/** * Appends {@code char} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final char value) { appendAttribute(name, String.valueOf(value)); return this; }
/** * Appends {@code byte[]} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final byte[] value) { appendAttribute(name, Arrays.toString(value)); return this; }
/** * Appends {@code double[]} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final double[] value) { appendAttribute(name, Arrays.toString(value)); return this; }
/** * Appends {@code long} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final long value) { appendAttribute(name, String.valueOf(value)); return this; }
/** * Appends {@code Object} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final Object value) { appendAttribute(name, String.valueOf(value)); return this; }
/** * Appends {@code Object[]} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final Object[] value) { appendAttribute(name, Arrays.toString(value)); return this; }
/** * Appends {@code float} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final float value) { appendAttribute(name, String.valueOf(value)); return this; }
/** * Appends {@code int} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final int value) { appendAttribute(name, String.valueOf(value)); return this; }
/** * Appends {@code int[]} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final int[] value) { appendAttribute(name, Arrays.toString(value)); return this; }
/** * Appends {@code long[]} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder append(final String name, final long[] value) { appendAttribute(name, Arrays.toString(value)); return this; }
/** * Appends {@code Collection} attribute with specified {@code name} and {@code value} * * @param name * attribute name * @param value * attribute value * @return this */ public <T> ToStringBuilder append(final String name, final Collection<T> value) { appendAttribute(name, value == null ? null : Arrays.toString(value.toArray())); return this; }
/** * Appends {@code String} attribute with specified {@code name} and its filtered {@code value}: * <ul> * <li>If value is not {@code null}, then {@code getFilteredContent()} is appended as value</li> * <li>Otherwise {@code null} is appended as value</li> * </ul> * * @param name * attribute name * @param value * attribute value * @return this */ public ToStringBuilder appendFiltered(final String name, final String value) { appendAttribute(name, filterValue(value)); return this; }