@@ -36,9 +36,10 @@ public interface Attributes {
3636 /**
3737 * Returns the value for the given {@link AttributeKey}, or {@code null} if not found.
3838 *
39- * <p>Note: this method will automatically convert simple attributes to complex attributes when
40- * passed a key of type {@link AttributeType#VALUE}. This is the inverse of {@link
41- * AttributesBuilder#put(AttributeKey, Object)} when the key is {@link AttributeType#VALUE}.
39+ * <p>Note: this method will automatically return the corresponding {@link Value} instance when
40+ * passed a key of type {@link AttributeType#VALUE} and a simple attribute is found. This is the
41+ * inverse of {@link AttributesBuilder#put(AttributeKey, Object)} when the key is {@link
42+ * AttributeType#VALUE}.
4243 *
4344 * <ul>
4445 * <li>If {@code put(AttributeKey.stringKey("key"), "a")} was called, then {@code
@@ -62,6 +63,17 @@ public interface Attributes {
6263 * called, then {@code get(AttributeKey.valueKey("key"))} returns {@code
6364 * Value.of(Value.of(true), Value.of(false))}.
6465 * </ul>
66+ *
67+ * Further, if {@code put(AttributeKey.valueKey("key"), Value.of(emptyList()))} was called, then
68+ *
69+ * <ul>
70+ * <li>{@code get(AttributeKey.stringArrayKey("key"))}
71+ * <li>{@code get(AttributeKey.longArrayKey("key"))}
72+ * <li>{@code get(AttributeKey.booleanArrayKey("key"))}
73+ * <li>{@code get(AttributeKey.doubleArrayKey("key"))}
74+ * </ul>
75+ *
76+ * all return an empty list (as opposed to {@code null}).
6577 */
6678 @ Nullable
6779 <T > T get (AttributeKey <T > key );
0 commit comments