com.aspose.html.forms

Class OptionCollection

  • java.lang.Object
    • com.aspose.html.forms.OptionCollection
  • All Implemented Interfaces:
    com.aspose.ms.System.Collections.Generic.IGenericEnumerable<OptionElement>, com.aspose.ms.System.Collections.IEnumerable<OptionElement>, java.lang.Iterable<OptionElement>


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

    The OptionElements represents a wrapper that is associated with the IHTMLOptionsCollection

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      OptionElement add()
      Add new option.
      OptionElement get_Item(int index)
      Gets the OptionElement at the specified index.
      int getCount()
      The number of Option in the list.
      com.aspose.ms.System.Collections.Generic.IGenericEnumerator<OptionElement> iterator()
      Returns an enumerator that iterates through the collection.
      void remove(OptionElement option)
      Remove the option from list.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • 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.ms.System.Collections.Generic.IGenericEnumerator<OptionElement> iterator()

        Returns an enumerator that iterates through the collection.

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