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>>
A IValueDescriptorBuilder for creating a list value descriptor. Use IValueDescriptorFactory.listBuilder(IValueDescriptor) to create a builder.
Since:
7.0.0
Author:
XIMA MEDIA GmbH
  • Method Details

    • defaultValue

      IListValueDescriptorBuilder<V> defaultValue(int index, IValueCreator<V> 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

      default IListValueDescriptorBuilder<V> defaultValue(int index, V 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

      IListValueDescriptorBuilder<V> description(String description)
      Specified by:
      description in interface IValueDescriptorBuilder<List<V>,IListValueBuilder<V>,IListValueDescriptor<V>>
      Parameters:
      description - The description for the value. May be either a localized message or an I18N key.
      Returns:
      This builder instance for chaining method calls.
    • length

      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 from defaultValue(int, IValueCreator) is used.
      Parameters:
      length - Range for the allowed length of the list.
      Returns:
      This descriptor builder for chaining method calls.