public class ResourceAssignmentCollection extends AbstractList<T>
Represents a collection of ResourceAssignment
objects.
Modifier and Type | Method and Description |
---|---|
ResourceAssignment |
add(Task task,
Resource resource)
Adds new assignment to the ResourceAssignmentCollection.
|
ResourceAssignment |
add(Task task,
Resource resource,
BigDecimal cost)
Adds new assignment to the ResourceAssignmentCollection.
|
ResourceAssignment |
add(Task task,
Resource resource,
double units)
Adds new assignment to the ResourceAssignmentCollection.
|
void |
clear()
Removes all items from the collection.
|
void |
copyTo(T[] array,
int arrayIndex) |
ResourceAssignment |
get(int index)
(@inheritDoc}
|
ResourceAssignment |
getByUid(int uid)
Returns an assignment with the specified uid.
|
Project |
getParentProject()
Gets the parent project of the ResourceAssignmentCollection object.
|
boolean |
isReadOnly()
Gets a value indicating whether this collection is read only.
|
boolean |
remove(Object o) |
int |
size()
Gets the number of objects contained in the ResourceAssignmentCollection.
|
void |
sort(Comparator<? super T> c) |
List<ResourceAssignment> |
toList()
Converts the ResourceAssignmentCollection object to a list of
ResourceAssignment objects. |
add, add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList
addAll, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
addAll, contains, containsAll, isEmpty, removeAll, replaceAll, retainAll, spliterator, toArray, toArray
parallelStream, removeIf, stream
public final ResourceAssignment add(Task task, Resource resource, double units)
Adds new assignment to the ResourceAssignmentCollection.
task
- A task to be assigned.resource
- A resource to be assigned.units
- The number of units for a new assignment.public final ResourceAssignment add(Task task, Resource resource, BigDecimal cost)
Adds new assignment to the ResourceAssignmentCollection.
task
- A task to be assigned.resource
- A cost resource to be assigned.cost
- The cost for a new assignment.public final ResourceAssignment add(Task task, Resource resource)
Adds new assignment to the ResourceAssignmentCollection.
task
- A task to be assigned.resource
- A resource to be assigned.public void clear()
clear
in interface Collection<ResourceAssignment>
clear
in interface List<ResourceAssignment>
clear
in class AbstractList<ResourceAssignment>
public ResourceAssignment get(int index)
get
in interface List<ResourceAssignment>
get
in class AbstractList<ResourceAssignment>
index
- public final ResourceAssignment getByUid(int uid)
Returns an assignment with the specified uid. O(1) complexity operation.
uid
- The specified uid.public Project getParentProject()
Gets the parent project of the ResourceAssignmentCollection object.
public final boolean isReadOnly()
Gets a value indicating whether this collection is read only.
public final boolean remove(Object o)
remove
in interface Collection<ResourceAssignment>
remove
in interface List<ResourceAssignment>
remove
in class AbstractCollection<ResourceAssignment>
public final int size()
Gets the number of objects contained in the ResourceAssignmentCollection.
size
in interface Collection<ResourceAssignment>
size
in interface List<ResourceAssignment>
size
in class AbstractCollection<ResourceAssignment>
public final List<ResourceAssignment> toList()
Converts the ResourceAssignmentCollection object to a list of ResourceAssignment
objects.
ResourceAssignment
objects.public void sort(Comparator<? super T> c)
c
- public void copyTo(T[] array, int arrayIndex)
Copyright (c) 2008-2020 Aspose Pty Ltd. All Rights Reserved.