Package com.aspose.tasks
Class TaskLinkCollection
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<T>
-
- com.aspose.tasks.TaskLinkCollection
-
public class TaskLinkCollection extends AbstractList<T>
Represents a collection of
Taskobjects.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(TaskLink e)This is the stub implementation of ICollection's Add method, that only throws UnsupportedOperationExceptionTaskLinkadd(Task pred, Task succ)Returns an instance of Finish-StartTaskLinkwhich has been added to the TaskLinkCollection object.TaskLinkadd(Task pred, Task succ, int linkType)Returns an instance ofTaskLinkwhich has been added to the TaskLinkCollection object.TaskLinkadd(Task pred, Task succ, int linkType, Duration lag)Returns an instance ofTaskLinkwhich has been added to the TaskLinkCollection object.voidclear()Reserved for internal usage.TaskLinkget(int index)(@inheritDoc}ProjectgetParentProject()Gets the parent project of the ResourceAssignmentCollection object.TaskLinkremove(int index)Removes the element at the specified position in this collection and returns the element that was removed from the collection.booleanremove(Object item)Removes task link from a project.intsize()Returns the number of objects contained in thisTaskLinkCollectionobject.voidsort(Comparator<? super TaskLink> c)List<TaskLink>toList()Converts the TaskLinkCollection object to a list ofTaskLinkobjects.-
Methods inherited from class java.util.AbstractList
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, removeAll, replaceAll, retainAll, spliterator, toArray, toArray
-
-
-
-
Method Detail
-
add
public final TaskLink add(Task pred, Task succ)
Returns an instance of Finish-Start
TaskLinkwhich has been added to the TaskLinkCollection object.- Parameters:
pred- Predecessor task.succ- Successor task.- Returns:
- a task link instance which has been added to this object.
- Throws:
com.aspose.ms.System.ArgumentNullException- If any of input tasks is equal to null thenArgumentNullExceptionwill be thrown.
-
add
public final TaskLink add(Task pred, Task succ, int linkType)
Returns an instance of
TaskLinkwhich has been added to the TaskLinkCollection object.- Parameters:
pred- Predecessor task.succ- Successor task.linkType- Link typeTaskLinkType- Returns:
- a task link instance which has been added to this object.
- Throws:
com.aspose.ms.System.ArgumentNullException- If any of input tasks is equal to null thenArgumentNullExceptionwill be thrown.
-
add
public final TaskLink add(Task pred, Task succ, int linkType, Duration lag)
Returns an instance of
TaskLinkwhich has been added to the TaskLinkCollection object.- Parameters:
pred- Predecessor task.succ- Successor task.linkType- Link typeTaskLinkTypelag- Link lagDuration.- Returns:
- a task link which has been added to this object.
- Throws:
com.aspose.ms.System.ArgumentNullException- If any of input tasks is equal to null thenArgumentNullExceptionwill be thrown.
-
add
public final boolean add(TaskLink e)
This is the stub implementation of ICollection's Add method, that only throws UnsupportedOperationException
- Specified by:
addin interfaceCollection<TaskLink>- Specified by:
addin interfaceList<TaskLink>- Overrides:
addin classAbstractList<TaskLink>- Parameters:
e- The item to add.- Returns:
-
clear
public final void clear()
Reserved for internal usage.- Specified by:
clearin interfaceCollection<TaskLink>- Specified by:
clearin interfaceList<TaskLink>- Overrides:
clearin classAbstractList<TaskLink>
-
get
public TaskLink get(int index)
(@inheritDoc}
-
getParentProject
public final Project getParentProject()
Gets the parent project of the ResourceAssignmentCollection object.- Returns:
- parent
Projectfor this object.
-
remove
public final boolean remove(Object item)
Removes task link from a project.- Specified by:
removein interfaceCollection<TaskLink>- Specified by:
removein interfaceList<TaskLink>- Overrides:
removein classAbstractCollection<TaskLink>- Parameters:
item- the specified instance ofTaskLinkclass to remove.- Returns:
- returns the instance of
TaskLinkclass which was removed from this collection.
-
remove
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.
-
size
public final int size()
Returns the number of objects contained in this
TaskLinkCollectionobject. Read onlyint.- Specified by:
sizein interfaceCollection<TaskLink>- Specified by:
sizein interfaceList<TaskLink>- Specified by:
sizein classAbstractCollection<TaskLink>- Returns:
- returns the number of objects contained in this collection.
-
sort
public void sort(Comparator<? super TaskLink> c)
-
-