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

      • to_MailAddressCollection

        public static MailAddressCollection to_MailAddressCollection(MailAddress address)

        Performs an implicit conversion from MailAddress to MailAddressCollection.

        Parameters:
        address - The address.
        Returns:
        The result of the conversion.
      • to_MailAddressCollection

        public static MailAddressCollection to_MailAddressCollection(String addresses)

        Performs an implicit conversion from System.String to MailAddressCollection.

        Parameters:
        addresses - The address list.
        Returns:
        The result of the conversion.
      • add

        public 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.
      • addMailAddress

        public void addMailAddress(MailAddress address)

        Add a MailAddress to the collection.

        Parameters:
        address - The MailAddress
      • toString

        public String toString()

        Returns a System.String that represents this instance.

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

        public void addRange(MailAddressCollection addresses)

        Adds addresses to collection

        Parameters:
        addresses - Collection of mail addresses
      • addRange

        public 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:
        T:System.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 T: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:
        T:System.ArgumentOutOfRangeException - index is less than zero. -or- index is greater than P:System.Collections.ObjectModel.Collection`1.Count.