public class ResourceAssignmentCollection extends AbstractList<T>
Represents a collection of ResourceAssignment
objects.
Modifier and Type | Method and Description |
---|---|
boolean |
add(ResourceAssignment item)
This is the stub implementation of ICollection's Add method, that only throws UnsupportedOperationException
|
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.
|
boolean |
contains(Object o) |
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.
|
int |
indexOf(Object o) |
boolean |
isReadOnly()
Gets a value indicating whether this collection is read only.
|
Iterator<ResourceAssignment> |
iterator()
Returns an enumerator for this collection.
|
ResourceAssignment |
remove(int index) |
boolean |
remove(Object o)
Removes specified assignment from collection, if it is not read-only,
otherwise throws UnsupportedOperationException.
|
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, addAll, equals, hashCode, lastIndexOf, listIterator, listIterator, set, subList
addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
addAll, 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 final boolean add(ResourceAssignment item)
This is the stub implementation of ICollection's Add method, that only throws UnsupportedOperationException
add
in interface Collection<ResourceAssignment>
add
in interface List<ResourceAssignment>
add
in class AbstractList<ResourceAssignment>
item
- The item to remove.public void clear()
clear
in interface Collection<ResourceAssignment>
clear
in interface List<ResourceAssignment>
clear
in class AbstractList<ResourceAssignment>
public final boolean contains(Object o)
contains
in interface Collection<ResourceAssignment>
contains
in interface List<ResourceAssignment>
contains
in class AbstractCollection<ResourceAssignment>
o
- public final ResourceAssignment getByUid(int uid)
Returns an assignment with the specified uid.
uid
- The specified uid.
public final Project getParentProject()
Gets the parent project of the ResourceAssignmentCollection object.
public final int indexOf(Object o)
indexOf
in interface List<ResourceAssignment>
indexOf
in class AbstractList<ResourceAssignment>
o
- public final boolean isReadOnly()
Gets a value indicating whether this collection is read only.
public final Iterator<ResourceAssignment> iterator()
Returns an enumerator for this collection.
iterator
in interface Iterable<ResourceAssignment>
iterator
in interface Collection<ResourceAssignment>
iterator
in interface List<ResourceAssignment>
iterator
in class AbstractList<ResourceAssignment>
public final boolean remove(Object o)
Removes specified assignment from collection, if it is not read-only, otherwise throws UnsupportedOperationException.
remove
in interface Collection<ResourceAssignment>
remove
in interface List<ResourceAssignment>
remove
in class AbstractCollection<ResourceAssignment>
o
- The assignment to remove.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 ResourceAssignment get(int index)
get
in interface List<ResourceAssignment>
get
in class AbstractList<ResourceAssignment>
index
- public ResourceAssignment remove(int index)
remove
in interface List<ResourceAssignment>
remove
in class AbstractList<ResourceAssignment>
index
- public void sort(Comparator<? super T> c)
c
-