Returns the last metadata entry added with the name 'name' parsed as T. @return the parsed metadata entry or null if there are none.
(Key<T> key)
| 245 | * @return the parsed metadata entry or null if there are none. |
| 246 | */ |
| 247 | @Nullable |
| 248 | public <T> T get(Key<T> key) { |
| 249 | for (int i = size - 1; i >= 0; i--) { |
| 250 | if (bytesEqual(key.asciiName(), name(i))) { |
| 251 | return valueAsT(i, key); |
| 252 | } |
| 253 | } |
| 254 | return null; |
| 255 | } |
| 256 | |
| 257 | private final class IterableAt<T> implements Iterable<T> { |
| 258 | private final Key<T> key; |