public class GenericDescriptors extends java.lang.Object implements Descriptors
Descriptors interface. Supports overlying of given default descriptors.| Constructor and Description |
|---|
GenericDescriptors()
Constructs an empty descriptors set.
|
GenericDescriptors(@Nullable Descriptors base)
Constructs a descriptors set that uses the given
base descriptors as base. |
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.lang.String[] |
getKeys()
Returns a string array holding all descriptor keys available for this
implementation, both the standard descriptors defined by the string
constants in this interface and any implementation-specific descriptors.
|
@Nullable Value |
getValue(@NotNull java.lang.String key)
The value of a single-value descriptor is found by passing the key for
that descriptor to this method.
|
@Nullable Value[] |
getValues(@NotNull java.lang.String key)
The value array of a multi-value descriptor is found by passing the key
for that descriptor to this method.
|
boolean |
isSingleValueDescriptor(@NotNull java.lang.String key)
Returns
true if key is a valid single-value
descriptor; otherwise returns false |
boolean |
isStandardDescriptor(@NotNull java.lang.String key)
Returns
true if key is a standard descriptor
defined by the string constants in this interface and false
if it is either a valid implementation-specific key or not a valid key. |
GenericDescriptors |
put(@NotNull java.lang.String name,
@NotNull Value[] values,
boolean singleValued,
boolean standard)
Adds a new descriptor to this set of descriptors which overlay the ones from the base set.
|
GenericDescriptors |
put(@NotNull java.lang.String name,
@NotNull Value value,
boolean singleValued,
boolean standard)
Adds a new descriptor to this set of descriptors which overlay the ones from the base set.
|
public GenericDescriptors()
public GenericDescriptors(@Nullable
@Nullable Descriptors base)
base descriptors as base.base - the base descriptors or null@NotNull public @NotNull java.lang.String[] getKeys()
Descriptors.getValue(String key) and
Descriptors.getValues(String key) to query information about this
repository implementation.
Note: If this descriptors are based on default descriptors, the returns string array is a merge of this and the
base's keys.getKeys in interface Descriptorspublic boolean isStandardDescriptor(@NotNull
@NotNull java.lang.String key)
true if key is a standard descriptor
defined by the string constants in this interface and false
if it is either a valid implementation-specific key or not a valid key.
Note: If the descriptor with key does not exist in this set, the call is delegated to the base descriptors.isStandardDescriptor in interface Descriptorskey - a descriptor key.key is a standard descriptor.public boolean isSingleValueDescriptor(@NotNull
@NotNull java.lang.String key)
true if key is a valid single-value
descriptor; otherwise returns false
Note: If the descriptor with key does not exist in this set, the call is delegated to the base descriptors.isSingleValueDescriptor in interface Descriptorskey - a descriptor key.@Nullable public @Nullable Value getValue(@NotNull @NotNull java.lang.String key)
key is the key of a
multi-value descriptor or not a valid key this method returns
null.
Note: If the descriptor with key does not exist in this set, the call is delegated to the base descriptors.getValue in interface Descriptorskey - a descriptor key.@Nullable public @Nullable Value[] getValues(@NotNull @NotNull java.lang.String key)
key is the key of a
single-value descriptor then this method returns that value as an array
of size one. If key is not a valid key this method returns
null.
Note: If the descriptor with key does not exist in this set, the call is delegated to the base descriptors.getValues in interface Descriptorskey - a descriptor key.public GenericDescriptors put(@NotNull @NotNull java.lang.String name, @NotNull @NotNull Value[] values, boolean singleValued, boolean standard)
name - descriptor namevalues - array of descriptor valuessingleValued - flag indicating if this is single valued descriptor. see Descriptors.isSingleValueDescriptor(String)standard - flag indicating if this is a standard descriptor. see Descriptors.isStandardDescriptor(String)this suitable for chaining.public GenericDescriptors put(@NotNull @NotNull java.lang.String name, @NotNull @NotNull Value value, boolean singleValued, boolean standard)
name - descriptor namevalue - descriptor valuesingleValued - flag indicating if this is single valued descriptor. see Descriptors.isSingleValueDescriptor(String)standard - flag indicating if this is a standard descriptor. see Descriptors.isStandardDescriptor(String)this suitable for chaining.Copyright © 2010 - 2023 Adobe. All Rights Reserved