com.aspose.tasks

Interfaces

Classes

Exceptions

com.aspose.tasks

Class CalendarCollection

    • Method Detail

      • add

        public final Calendar add(String name)

        Adds a new base calendar to this CalendarCollection object and returns added calendar.

        Parameters:
        name - Calendar name.
        Returns:
        Added Calendar object.
        Throws:
        com.aspose.ms.System.ArgumentException - is thrown if calendar name is null or empty.
      • add

        public final Calendar add(String name,
                                  Calendar baseCalendar)

        Adds a new calendar with specified base calendar to this CalendarCollection object and returns added calendar.

        Parameters:
        name - Specified name.
        baseCalendar - Specified base calendar.
        Returns:
        Added Calendar object.
      • getByName

        public final Calendar getByName(String name)

        Returns a calendar with the specified name.

        Parameters:
        name - Name of a calendar.
        Returns:
        If found returns calendar with a specified name else returns null.
      • getByUid

        public final Calendar getByUid(int uid)

        Returns a calendar with the specified Uid.

        Parameters:
        uid - Uid of a calendar.
        Returns:
        Calendar with a specified uid.
      • getCount

        @Deprecated
        public int getCount()
        Deprecated. Use size() instead.

        Returns the number of objects contained in this CalendarCollection object. Read only int.

        Returns:
        the number of objects contained in the collection.
      • getParentProject

        public Project getParentProject()

        Returns a parent Project of this object. Read only Project.

        Returns:
        parent project of this collection.
      • remove

        public boolean remove(Object object)

        Removes Calendar from Project CalendarCollection.

        Specified by:
        remove in interface Collection<Calendar>
        Specified by:
        remove in interface List<Calendar>
        Overrides:
        remove in class AbstractCollection<Calendar>
        Parameters:
        object - Calendar instance to remove.
        Throws:
        com.aspose.ms.System.InvalidOperationException - is thrown when trying to remove standard calendar.
      • set

        public Calendar set(int index,
                            Calendar element)
        Replaces the element at the specified position in this list with the specified element.
        Specified by:
        set in interface List<Calendar>
        Overrides:
        set in class AbstractList<Calendar>
        Parameters:
        index -
        element -
        Returns:
      • toList

        public final List<Calendar> toList()

        Converts the CalendarCollection object to a list of Calendar objects.

        Returns:
        List of Calendar objects.