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 - Thrown when calendar name is null.
      • 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.
      • getParentProject

        public final Project getParentProject()

        Gets a parent Project of this object.


        Read only Project.
        Returns:
        a parent Project of this object.
      • remove

        public final 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.
        Returns:
        If removed returns true, else returns false.
        Throws:
        com.aspose.ms.System.InvalidOperationException - Thrown when calendar cannot be removed.
      • 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.
      • sort

        public void sort(Comparator<? super T> c)
        Parameters:
        c -