com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class MailAddressCollection

  • All Implemented Interfaces:
    com.aspose.ms.System.Collections.Generic.IGenericCollection<MailAddress>, com.aspose.ms.System.Collections.Generic.IGenericEnumerable<MailAddress>, com.aspose.ms.System.Collections.Generic.IGenericList<MailAddress>, com.aspose.ms.System.Collections.IEnumerable<MailAddress>, Iterable<MailAddress>


    public class MailAddressCollection
    extends com.aspose.ms.System.Collections.ObjectModel.Collection<MailAddress>

    Represents a collection of MailAddress objects.

    • Constructor Detail

      • MailAddressCollection

        public MailAddressCollection()
    • Method Detail

      • toString

        public String toString()

        Returns a String that represents this instance.

        Overrides:
        toString in class Object
        Returns:
        A String that represents this instance.
      • add

        public final void add(String addresses)

        Add a list of e-mail addresses to the collection.

        Parameters:
        addresses - An address list. Addresses must be separated with a comma character.
      • addRange

        public final void addRange(MailAddressCollection addresses)

        Adds addresses to collection

        Parameters:
        addresses - Collection of mail addresses
      • addRange

        public final void addRange(Iterable<MailAddress> addresses)

        Adds addresses to collection

        Parameters:
        addresses - Enumeration of mail addresses
      • setItem

        protected void setItem(int index,
                   MailAddress item)

        Replaces the element at the specified index.

        Overrides:
        setItem in class com.aspose.ms.System.Collections.ObjectModel.Collection<MailAddress>
        Parameters:
        index - The zero-based index of the element to replace.
        item - The new value for the element at the specified index. The value can be null for reference types.
        Throws:
        ArgumentOutOfRangeException - index is less than zero. -or- index is greater than P:System.Collections.ObjectModel.Collection`1.Count.
      • insertItem

        public void insertItem(int index,
                      MailAddress item)

        Inserts an element into the System.Collections.ObjectModel.Collection`1 at the specified index.

        Specified by:
        insertItem in interface com.aspose.ms.System.Collections.Generic.IGenericList<MailAddress>
        Overrides:
        insertItem in class com.aspose.ms.System.Collections.ObjectModel.Collection<MailAddress>
        Parameters:
        index - The zero-based index at which item should be inserted.
        item - The object to insert. The value can be null for reference types.
        Throws:
        ArgumentOutOfRangeException - index is less than zero. -or- index is greater than P:System.Collections.ObjectModel.Collection`1.Count.
      • clearItems

        protected void clearItems()

        Removes all elements from the System.Collections.ObjectModel.Collection`1.

      • removeItem

        protected void removeItem(int index)

        Removes the element at the specified index of the System.Collections.ObjectModel.Collection`1.

        Parameters:
        index - The zero-based index of the element to remove.