TaskLinkCollection

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

public class TaskLinkCollection extends AbstractList<TaskLink>

Represents a collection of Task objects.

Methods

MethodDescription
add(Task pred, Task succ)Returns an instance of Finish-Start TaskLink which has been added to the TaskLinkCollection object.
add(Task pred, Task succ, int linkType)Returns an instance of TaskLink which has been added to the TaskLinkCollection object.
add(Task pred, Task succ, int linkType, Duration lag)Returns an instance of TaskLink which has been added to the TaskLinkCollection object.
add(TaskLink e)This is the stub implementation of ICollection’s Add method, that only throws UnsupportedOperationException
clear()Reserved for internal usage.
get(int index)(@inheritDoc}
getParentProject()Gets the parent project of the ResourceAssignmentCollection object.
remove(int index)Removes the element at the specified position in this collection and returns the element that was removed from the collection.
remove(Object item)Removes task link from a project.
size()Returns the number of objects contained in this TaskLinkCollection object.
sort(Comparator<? super TaskLink> c){@inheritDoc}
toList()Converts the TaskLinkCollection object to a list of TaskLink objects.

add(Task pred, Task succ)

public final TaskLink add(Task pred, Task succ)

Returns an instance of Finish-Start TaskLink which has been added to the TaskLinkCollection object.

Parameters:

ParameterTypeDescription
predTaskPredecessor task.
succTaskSuccessor task.

Returns: TaskLink - a task link instance which has been added to this object.

add(Task pred, Task succ, int linkType)

public final TaskLink add(Task pred, Task succ, int linkType)

Returns an instance of TaskLink which has been added to the TaskLinkCollection object.

Parameters:

ParameterTypeDescription
predTaskPredecessor task.
succTaskSuccessor task.
linkTypeintLink type TaskLinkType

Returns: TaskLink - a task link instance which has been added to this object.

add(Task pred, Task succ, int linkType, Duration lag)

public final TaskLink add(Task pred, Task succ, int linkType, Duration lag)

Returns an instance of TaskLink which has been added to the TaskLinkCollection object.

Parameters:

ParameterTypeDescription
predTaskPredecessor task.
succTaskSuccessor task.
linkTypeintLink type TaskLinkType
lagDurationLink lag Duration.

Returns: TaskLink - a task link which has been added to this object.

public final boolean add(TaskLink e)

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

Parameters:

ParameterTypeDescription
eTaskLinkThe item to add.

Returns: boolean - {@inheritDoc}

clear()

public final void clear()

Reserved for internal usage.

get(int index)

public TaskLink get(int index)

(@inheritDoc}

Parameters:

ParameterTypeDescription
indexint{@inheritDoc}

Returns: TaskLink - {@inheritDoc}

getParentProject()

public final Project getParentProject()

Gets the parent project of the ResourceAssignmentCollection object.

Returns: Project - parent Project for this object.

remove(int index)

public final TaskLink remove(int index)

Removes the element at the specified position in this collection and returns the element that was removed from the collection.

Parameters:

ParameterTypeDescription
indexintthe specified position to remove the element at.

Returns: TaskLink - the element that was removed from the collection.

remove(Object item)

public final boolean remove(Object item)

Removes task link from a project.

Parameters:

ParameterTypeDescription
itemjava.lang.Objectthe specified instance of TaskLink class to remove.

Returns: boolean - returns the instance of TaskLink class which was removed from this collection.

size()

public final int size()

Returns the number of objects contained in this TaskLinkCollection object. Read only int.

Returns: int - returns the number of objects contained in this collection.

public void sort(Comparator<? super TaskLink> c)

Parameters:

ParameterTypeDescription
cjava.util.Comparator<? super com.aspose.tasks.TaskLink>{@inheritDoc}

toList()

public final List<TaskLink> toList()

Converts the TaskLinkCollection object to a list of TaskLink objects.

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