/** * Factory method. * * @param object Object to be wrapped * @param label New label for the wrapped object * @return A new {@code StringLabeller} object * @since 0.2.2 */ public static <T> StringLabeller of(T object, String label) { return new StringLabeller<T>(object, label, true); }
/** * Factory method for an unmodifiable object. * * @param object Object to be wrapped * @param label New label for the wrapped object * @return A new {@code StringLabeller} object * @since 0.3.1 */ public static <T> StringLabeller unmodifiableOf(T object, String label) { return new StringLabeller<T>(object, label, false); }