/** * {@inheritDoc} * <p> * Since this is a constant, the model will first be copied and the * operation will then be performed on the copy. */ @Override public AnnotationUsage put(String key, Value<?> val) { return copy().put(requireNonNull(key), val); }
/** * Use the specified key-value pair when referencing the annotation. If you * only want to show a single value without any key, consider using the * {@link #set(Value)} method. * <p> * This method works like {@link #put(String, Value)} except that the type * of the value is automatically determined as a {@link TextValue}. * * @param key the key * @param textValue the value * @return a reference to this model * * @since 2.5 */ default AnnotationUsage put(String key, String textValue) { return put(key, Value.ofText(textValue)); }
/** * Use the specified key-value pair when referencing the annotation. If you * only want to show a single value without any key, consider using the * {@link #set(Value)} method. * <p> * This method works like {@link #put(String, Value)} except that the type * of the value is automatically determined as a {@link NumberValue}. * * @param key the key * @param numberValue the value * @return a reference to this model * * @since 2.5 */ default AnnotationUsage put(String key, Number numberValue) { return put(key, Value.ofNumber(numberValue)); }
/** * {@inheritDoc} * <p> * Since this is a constant, the model will first be copied and the * operation will then be performed on the copy. */ @Override public AnnotationUsage put(String key, Value<?> val) { return copy().put(requireNonNull(key), val); }
/** * {@inheritDoc} * <p> * Since this is a constant, the model will first be copied and the * operation will then be performed on the copy. */ @Override public AnnotationUsage put(String key, Value<?> val) { return copy().put(requireNonNull(key), val); }
/** * Use the specified key-value pair when referencing the annotation. If you * only want to show a single value without any key, consider using the * {@link #set(Value)} method. * <p> * This method works like {@link #put(String, Value)} except that the type * of the value is automatically determined as a {@link NumberValue}. * * @param key the key * @param numberValue the value * @return a reference to this model * * @since 2.5 */ default AnnotationUsage put(String key, Number numberValue) { return put(key, Value.ofNumber(numberValue)); }
/** * Use the specified key-value pair when referencing the annotation. If you * only want to show a single value without any key, consider using the * {@link #set(Value)} method. * <p> * This method works like {@link #put(String, Value)} except that the type * of the value is automatically determined as a {@link TextValue}. * * @param key the key * @param textValue the value * @return a reference to this model * * @since 2.5 */ default AnnotationUsage put(String key, String textValue) { return put(key, Value.ofText(textValue)); }