com.aspose.tasks

Interfaces

Classes

Exceptions

com.aspose.tasks

Class ResourceCollection

    • Method Detail

      • getCount

        public int getCount()

        Gets the number of elements contained in the ResourceCollection. Read-only int.

        Returns:
        returns the number of elements contained in this collection.
      • getParentProject

        public Project getParentProject()

        Gets the parent project of the ResourceCollection object.

        Returns:
        returns the parent project for this collection.
      • add

        public Resource add()

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

        Returns:
        Added resource.
      • add

        public 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 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 Resource getById(int id)

        Returns a resource with the specified id.

        Parameters:
        id - The specified id.

        O(1) complexity operation.

        Returns:
        Resource with the specified id if present; otherwise, null.
      • getByUid

        public Resource getByUid(int uid)

        Returns a resource with the specified Uid.

        Parameters:
        uid - The specified uid.

        O(1) complexity operation.

        Returns:
        Resource with the specified uid if present; otherwise, null.
      • toList

        public List<Resource> toList()

        Converts the ResourceCollection object to a list of Resource objects.

        Returns:
        List of Resource objects.