Interface IUnionValueDescriptorBuilder<D>

    • Method Detail

      • add

        default IUnionValueDescriptorBuilder<D> add​(D discriminator,
                                                    IValueDescriptor<?,​?> descriptor)
        Adds a discriminated union member to the list of a members of the union.
        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

        IUnionValueDescriptorBuilder<D> add​(D discriminator,
                                            IValueDescriptorCreator creator)
        Adds a discriminated union member to the list of a members of the union.
        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

        default IUnionValueDescriptorBuilder<D> addAndUseAsDefault​(D discriminator,
                                                                   IValueDescriptor<?,​?> 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.
        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

        IUnionValueDescriptorBuilder<D> addAndUseAsDefault​(D discriminator,
                                                           IValueDescriptorCreator 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.
        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.