Interface IUnionValueDescriptorBuilder<D>

    • Method Detail

      • add

        <T> IUnionValueDescriptorBuilder<D> add​(D discriminator,
                                                IValueDescriptor<T,​? extends IValueBuilder<T>> descriptor)
        Adds a discriminated union member to the list of a members of the union.
        Type Parameters:
        T - Type of the union member value.
        Parameters:
        discriminator - A union member discriminator to add.
        descriptor - Value descriptor for the value at the given discriminator.
        Returns:
        This value descriptor builder for chaining method calls.
      • add

        <T> IUnionValueDescriptorBuilder<D> add​(D discriminator,
                                                IValueDescriptorCreator<T> creator)
        Adds a discriminated union member to the list of a members of the union.
        Type Parameters:
        T - Type of the union member value.
        Parameters:
        discriminator - A union member discriminator to add.
        creator - Value creator for the value descriptor for the value at the given discriminator.
        Returns:
        This value descriptor builder for chaining method calls.
      • addAndUseAsDefault

        <T> IUnionValueDescriptorBuilder<D> addAndUseAsDefault​(D discriminator,
                                                               IValueDescriptor<T,​? extends IValueBuilder<T>> descriptor)
        Adds a discriminated union member to the list of a members of the union. Uses the member as the default value when no explicit value is provided.
        Type Parameters:
        T - Type of the union member value.
        Parameters:
        discriminator - A union member discriminator to add.
        descriptor - Value descriptor for the value at the given discriminator.
        Returns:
        This value descriptor builder for chaining method calls.
      • addAndUseAsDefault

        <T> IUnionValueDescriptorBuilder<D> addAndUseAsDefault​(D discriminator,
                                                               IValueDescriptorCreator<T> creator)
        Adds a discriminated union member to the list of a members of the union. Uses the member as the default value when no explicit value is provided.
        Type Parameters:
        T - Type of the union member value.
        Parameters:
        discriminator - A union member discriminator to add.
        creator - Value creator for the value descriptor for the value at the given discriminator.
        Returns:
        This value descriptor builder for chaining method calls.