com.aspose.tasks

Interfaces

Classes

Exceptions

com.aspose.tasks

Class ResourceCollection

    • Method Detail

      • add

        public final Resource add()

        Adds new resource at the last position of a project resources collection.

        Returns:
        Added resource.
      • add

        public final Resource add(String resourceName)

        Adds new resource at the last position of a project resources collection.

        Parameters:
        resourceName - Name of a resource.
        Returns:
        Added resource.
      • add

        public final Resource add(String resourceName,
                                  int beforeResourceId)

        Adds new resource at the specified position of a project resources collection.

        Parameters:
        resourceName - Name of a resource.
        beforeResourceId - Position of a resource in a project resources collection.
        Returns:
        Added resource.
      • getById

        public final Resource getById(int id)

        Returns a resource with the specified id.

        Parameters:
        id - The specified id.


        O(1) complexity.
        Returns:
        Resource with the specified id if present; otherwise, null.
      • getByUid

        public final Resource getByUid(int uid)

        Returns a resource with the specified Uid.

        Parameters:
        uid - The specified uid.


        O(1) complexity.
        Returns:
        Resource with the specified uid if present; otherwise, null.
      • getParentProject

        public final Project getParentProject()

        Gets the parent project of the ResourceCollection object.

        Returns:
        the parent project of the ResourceCollection object.
      • size

        public final int size()

        Gets the number of elements contained in the ResourceCollection.


        Read-only int.
        Specified by:
        size in interface Collection<Resource>
        Specified by:
        size in interface List<Resource>
        Specified by:
        size in class AbstractCollection<Resource>
        Returns:
        the number of elements contained in the ResourceCollection.
      • toList

        public final List<Resource> toList()

        Converts the ResourceCollection object to a list of Resource objects.

        Returns:
        List of Resource objects.