com.aspose.html.forms

Class OptionCollection

  • All Implemented Interfaces:
    com.aspose.html.internal.ms.System.Collections.Generic.IGenericEnumerable<OptionElement>, com.aspose.html.internal.ms.System.Collections.IEnumerable<OptionElement>, Iterable<OptionElement>


    public class OptionCollection
    extends Object
    implements com.aspose.html.internal.ms.System.Collections.Generic.IGenericEnumerable<OptionElement>

    The OptionElements represents a wrapper that is associated with the IHTMLOptionsCollection

    • Constructor Detail

      • OptionCollection

        public OptionCollection(HTMLElement element,
                                com.aspose.html.collections.LiveHTMLCollection options)

        Initializes a new instance of the OptionCollection class.

        Parameters:
        element - The HTMLSelectElement.
        options - The options collection.
    • Method Detail

      • getCount

        public int getCount()

        The number of Option in the list.

      • add

        public OptionElement add()

        Add new option.

        Returns:
        Return created OptionElement.
      • remove

        public void remove(OptionElement option)

        Remove the option from list.

        Parameters:
        option - The OptionElement.
      • iterator

        public com.aspose.html.internal.ms.System.Collections.Generic.IGenericEnumerator<OptionElement> iterator()

        Returns an enumerator that iterates through the collection.

        Specified by:
        iterator in interface com.aspose.html.internal.ms.System.Collections.Generic.IGenericEnumerable<OptionElement>
        Specified by:
        iterator in interface com.aspose.html.internal.ms.System.Collections.IEnumerable<OptionElement>
        Specified by:
        iterator in interface Iterable<OptionElement>
        Returns:
        Returns the enumerator of option elements