ResourceAssignmentCollection

Inheritance: java.lang.Object, java.util.AbstractCollection, java.util.AbstractList, com.aspose.tasks.AbstractList

public class ResourceAssignmentCollection extends AbstractList<ResourceAssignment>

Represents a collection of ResourceAssignment objects.

Methods

MethodDescription
add(ResourceAssignment item)This is the stub implementation of ICollection’s Add method, that only throws UnsupportedOperationException
add(Task task, Resource resource)Adds new assignment to the ResourceAssignmentCollection.
add(Task task, Resource resource, double units)Adds new assignment to the ResourceAssignmentCollection.
add(Task task, Resource resource, BigDecimal cost)Adds new assignment to the ResourceAssignmentCollection.
clear()Removes all items from the collection.
contains(Object o){@inheritDoc}
get(int index)(@inheritDoc}
getByUid(int uid)Returns an assignment with the specified uid.
getParentProject()Gets the parent project of the ResourceAssignmentCollection object.
indexOf(Object o){@inheritDoc}
isReadOnly()Gets a value indicating whether this collection is read only.
iterator()Returns an enumerator for this collection.
remove(int index){@inheritDoc}
remove(Object o)Removes specified assignment from collection, if it is not read-only, otherwise throws UnsupportedOperationException.
size()Gets the number of objects contained in the ResourceAssignmentCollection.
toList()Converts the ResourceAssignmentCollection object to a list of ResourceAssignment objects.

add(ResourceAssignment item)

public final boolean add(ResourceAssignment item)

This is the stub implementation of ICollection’s Add method, that only throws UnsupportedOperationException

Parameters:

ParameterTypeDescription
itemResourceAssignmentThe item to remove.

Returns: boolean - {@inheritDoc}

add(Task task, Resource resource)

public final ResourceAssignment add(Task task, Resource resource)

Adds new assignment to the ResourceAssignmentCollection.

Parameters:

ParameterTypeDescription
taskTaskA task to be assigned.
resourceResourceA resource to be assigned.

Returns: ResourceAssignment - Added assignment.

add(Task task, Resource resource, double units)

public final ResourceAssignment add(Task task, Resource resource, double units)

Adds new assignment to the ResourceAssignmentCollection.

Parameters:

ParameterTypeDescription
taskTaskA task to be assigned.
resourceResourceA resource to be assigned.
unitsdoubleThe number of units for a new assignment.

Returns: ResourceAssignment - Added assignment.

add(Task task, Resource resource, BigDecimal cost)

public final ResourceAssignment add(Task task, Resource resource, BigDecimal cost)

Adds new assignment to the ResourceAssignmentCollection.

Parameters:

ParameterTypeDescription
taskTaskA task to be assigned.
resourceResourceA cost resource to be assigned.
costjava.math.BigDecimalThe cost for a new assignment.

Returns: ResourceAssignment - Added assignment.

clear()

public void clear()

Removes all items from the collection.

contains(Object o)

public final boolean contains(Object o)

Parameters:

ParameterTypeDescription
ojava.lang.Object{@inheritDoc}

Returns: boolean - {@inheritDoc}

get(int index)

public ResourceAssignment get(int index)

(@inheritDoc}

Parameters:

ParameterTypeDescription
indexint{@inheritDoc}

Returns: ResourceAssignment - {@inheritDoc}

getByUid(int uid)

public final ResourceAssignment getByUid(int uid)

Returns an assignment with the specified uid.

Parameters:

ParameterTypeDescription
uidintThe specified uid.

O(1) complexity. |

Returns: ResourceAssignment - ResourceAssignment with the specified uid if present; otherwise, null.

getParentProject()

public final Project getParentProject()

Gets the parent project of the ResourceAssignmentCollection object.

Returns: Project - the parent project of the ResourceAssignmentCollection object.

indexOf(Object o)

public final int indexOf(Object o)

Parameters:

ParameterTypeDescription
ojava.lang.Object{@inheritDoc}

Returns: int - {@inheritDoc}

isReadOnly()

public final boolean isReadOnly()

Gets a value indicating whether this collection is read only.

Returns: boolean - a value indicating whether this collection is read only.

iterator()

public final Iterator<ResourceAssignment> iterator()

Returns an enumerator for this collection.

Returns: java.util.Iterator<com.aspose.tasks.ResourceAssignment> - an enumerator for this collection.

remove(int index)

public ResourceAssignment remove(int index)

Parameters:

ParameterTypeDescription
indexint{@inheritDoc}

Returns: ResourceAssignment - {@inheritDoc}

remove(Object o)

public final boolean remove(Object o)

Removes specified assignment from collection, if it is not read-only, otherwise throws UnsupportedOperationException.

Parameters:

ParameterTypeDescription
ojava.lang.ObjectThe assignment to remove.

Returns: boolean - true, if specified item was removed, false otherwise.

size()

public final int size()

Gets the number of objects contained in the ResourceAssignmentCollection.

Returns: int - the number of objects contained in the ResourceAssignmentCollection.

toList()

public final List<ResourceAssignment> toList()

Converts the ResourceAssignmentCollection object to a list of ResourceAssignment objects.

Returns: java.util.List<com.aspose.tasks.ResourceAssignment> - List of ResourceAssignment objects.