public class ResourceCollection extends AbstractList<Resource>
Represents a collection of Resource
objects.
Modifier and Type | Method and Description |
---|---|
Resource |
add()
Adds new resource at the last position of a project resources collection.
|
Resource |
add(String resourceName)
Adds new resource at the last position of a project resources collection.
|
Resource |
add(String resourceName,
int beforeResourceId)
Adds new resource at the specified position of a project resources collection.
|
Resource |
get(int index)
(@inheritDoc}
|
Resource |
getById(int id)
Returns a resource with the specified id.
|
Resource |
getByUid(int uid)
Returns a resource with the specified Uid.
|
int |
getCount()
Deprecated.
Use size() instead.
|
Project |
getParentProject()
Gets the parent project of the ResourceCollection object.
|
int |
size()
Gets the number of elements contained in the ResourceCollection.
|
List<Resource> |
toList()
Converts the ResourceCollection object to a list of
Resource objects. |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
@Deprecated public int getCount()
Gets the number of elements contained in the ResourceCollection.
Read-only int
.
public Project getParentProject()
public Resource add()
Adds new resource at the last position of a project resources collection.
public Resource add(String resourceName)
Adds new resource at the last position of a project resources collection.
resourceName
- Name of a resource.public Resource add(String resourceName, int beforeResourceId)
Adds new resource at the specified position of a project resources collection.
resourceName
- Name of a resource.beforeResourceId
- Position of a resource in a project resources collection.public Resource get(int index)
public Resource getById(int id)
Returns a resource with the specified id.
id
- The specified id.
O(1) complexity operation.
public Resource getByUid(int uid)
Returns a resource with the specified Uid.
uid
- The specified uid.
O(1) complexity operation.
public int size()
Gets the number of elements contained in the ResourceCollection.
Read-only int
.
size
in interface Collection<Resource>
size
in interface List<Resource>
size
in class AbstractCollection<Resource>
Copyright (c) 2008-2018 Aspose Pty Ltd. All Rights Reserved.