Interface IListValueDescriptorBuilder<V>
-
- Type Parameters:
V- Type of the list elements.
- All Superinterfaces:
org.apache.commons.lang3.builder.Builder<IListValueDescriptor<V>>,IValueDescriptorBuilder<List<V>,IListValueBuilder<V>,IListValueDescriptor<V>>
public interface IListValueDescriptorBuilder<V> extends IValueDescriptorBuilder<List<V>,IListValueBuilder<V>,IListValueDescriptor<V>>
AIValueDescriptorBuilderfor creating a list value descriptor. UseIValueDescriptorFactory.listBuilder(IValueDescriptor)to create a builder.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description IListValueDescriptorBuilder<V>addAttribute(String key, Object value)Adds a custom attribute to the value descriptor.IListValueDescriptorBuilder<V>addAttributes(Map<String,Object> attributes)Adds custom attributes to the value descriptor.IListValueDescriptorBuilder<V>attributes(Map<String,Object> attributes)Set the custom attributes for the value descriptor.IListValueDescriptorBuilder<V>defaultValue(int index, IValueCreator creator)Sets the default value for the element at the given index.default IListValueDescriptorBuilder<V>defaultValue(int index, Object value)Sets the default value for the element at the given index.IListValueDescriptorBuilder<V>description(String description)Deprecated.IListValueDescriptorBuilder<V>length(com.google.common.collect.Range<Integer> length)Restricts the length of the list value to a certain range.
-
-
-
Method Detail
-
addAttribute
@CanIgnoreReturnValue IListValueDescriptorBuilder<V> addAttribute(String key, Object value)
Description copied from interface:IValueDescriptorBuilderAdds a custom attribute to the value descriptor. This can be used to store additional metadata about the value that is not covered by the standard properties of the descriptor. The exact meaning of the attributes depends on the context in which the descriptor is used.See
StandardValueDescriptorAttributesfor some standard attribute keys and values you can use.- Specified by:
addAttributein interfaceIValueDescriptorBuilder<List<V>,IListValueBuilder<V>,IListValueDescriptor<V>>- Parameters:
key- The attribute key.value- The attribute value.- Returns:
- This builder instance for chaining method calls.
- See Also:
StandardValueDescriptorAttributes
-
addAttributes
@CanIgnoreReturnValue IListValueDescriptorBuilder<V> addAttributes(Map<String,Object> attributes)
Description copied from interface:IValueDescriptorBuilderAdds custom attributes to the value descriptor. These can be used to store additional metadata about the value that is not covered by the standard properties of the descriptor. The exact meaning of the attributes depends on the context in which the descriptor is used.See
StandardValueDescriptorAttributesfor some standard attribute keys and values you can use.- Specified by:
addAttributesin interfaceIValueDescriptorBuilder<List<V>,IListValueBuilder<V>,IListValueDescriptor<V>>- Returns:
- This builder instance for chaining method calls.
- See Also:
StandardValueDescriptorAttributes
-
attributes
@CanIgnoreReturnValue IListValueDescriptorBuilder<V> attributes(Map<String,Object> attributes)
Description copied from interface:IValueDescriptorBuilderSet the custom attributes for the value descriptor. These can be used to store additional metadata about the value that is not covered by the standard properties of the descriptor. The exact meaning of the attributes depends on the context in which the descriptor is used.See
StandardValueDescriptorAttributesfor some standard attribute keys and values you can use.- Specified by:
attributesin interfaceIValueDescriptorBuilder<List<V>,IListValueBuilder<V>,IListValueDescriptor<V>>- Returns:
- This builder instance for chaining method calls.
- See Also:
StandardValueDescriptorAttributes
-
defaultValue
@CanIgnoreReturnValue IListValueDescriptorBuilder<V> defaultValue(int index, IValueCreator creator)
Sets the default value for the element at the given index. The default value is taken from the list element value descriptor when no explicit default is provided.- Parameters:
index- Index in the list.creator- Value creator for the value to use for the element at the given index as the default when creating a list value.- Returns:
- This descriptor builder for chaining method calls.
-
defaultValue
@CanIgnoreReturnValue default IListValueDescriptorBuilder<V> defaultValue(int index, Object value)
Sets the default value for the element at the given index. The default value is taken from the list element value descriptor when no explicit default is provided.- Parameters:
index- Index in the list.value- Value to use for the element at the given index as the default when creating a list value.- Returns:
- This descriptor builder for chaining method calls.
-
description
@CanIgnoreReturnValue @Deprecated IListValueDescriptorBuilder<V> description(String description)
Deprecated.Description copied from interface:IValueDescriptorBuilderSets the description for the value. This description can be used in UIs to provide additional information about the value to users. It can be either a localized message or an I18N key that will be resolved at runtime.- Specified by:
descriptionin interfaceIValueDescriptorBuilder<List<V>,IListValueBuilder<V>,IListValueDescriptor<V>>- Parameters:
description- The description for the value.- Returns:
- This builder instance for chaining method calls.
-
length
@CanIgnoreReturnValue IListValueDescriptorBuilder<V> length(com.google.common.collect.Range<Integer> length)
Restricts the length of the list value to a certain range. When the minimum length is positive and no explicit value is provided for the first elements when creating a value, the default value fromdefaultValue(int, IValueCreator)is used.- Parameters:
length- Range for the allowed length of the list.- Returns:
- This descriptor builder for chaining method calls.
-
-