/** * {@inheritDoc} * * Note: If the descriptor with {@code key} does not exist in this set, the call is delegated to the base descriptors. */ @Nullable @Override public Value[] getValues(@NotNull String key) { Descriptor d = descriptors.get(key); if (d == null) { return base == null ? null : base.getValues(key); } return d.values; }
/** * {@inheritDoc} * * Note: If the descriptor with {@code key} does not exist in this set, the call is delegated to the base descriptors. */ @CheckForNull @Override public Value[] getValues(@Nonnull String key) { Descriptor d = descriptors.get(key); if (d == null) { return base == null ? null : base.getValues(key); } return d.values; }
@Nullable @Override public Value[] getValues(@NotNull String key) { for (Iterator<Descriptors> it = getDescriptors().iterator(); it.hasNext();) { Descriptors descriptors = it.next(); Value[] values = descriptors.getValues(key); if (values!=null) { return values; } } return null; }
@CheckForNull @Override public Value[] getValues(@Nonnull String key) { for (Iterator<Descriptors> it = getDescriptors().iterator(); it.hasNext();) { Descriptors descriptors = it.next(); Value[] values = descriptors.getValues(key); if (values!=null) { return values; } } return null; }
static DescriptorEntry fromKey(String key, Descriptors descriptors) { if (descriptors.isSingleValueDescriptor(key)) { return newSingleValuedEntry(key, descriptors.getValue(key), descriptors.isStandardDescriptor(key)); } else { return newMultiValuedEntry(key, descriptors.getValues(key), descriptors.isStandardDescriptor(key)); } }