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
Task
objects.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(TaskLink e)
This is the stub implementation of ICollection's Add method, that only throws UnsupportedOperationExceptionTaskLink
add(Task pred, Task succ)
Returns an instance of Finish-StartTaskLink
which has been added to the TaskLinkCollection object.TaskLink
add(Task pred, Task succ, int linkType)
Returns an instance ofTaskLink
which has been added to the TaskLinkCollection object.TaskLink
add(Task pred, Task succ, int linkType, Duration lag)
Returns an instance ofTaskLink
which has been added to the TaskLinkCollection object.void
clear()
Reserved for internal usage.TaskLink
get(int index)
(@inheritDoc}Project
getParentProject()
Gets the parent project of the ResourceAssignmentCollection object.TaskLink
remove(int index)
Removes the element at the specified position in this collection and returns the element that was removed from the collection.boolean
remove(Object item)
Removes task link from a project.int
size()
Returns the number of objects contained in thisTaskLinkCollection
object.void
sort(Comparator<? super TaskLink> c)
List<TaskLink>
toList()
Converts the TaskLinkCollection object to a list ofTaskLink
objects.-
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
TaskLink
which 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 thenArgumentNullException
will be thrown.
-
add
public final TaskLink add(Task pred, Task succ, int linkType)
Returns an instance of
TaskLink
which 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 thenArgumentNullException
will be thrown.
-
add
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:
pred
- Predecessor task.succ
- Successor task.linkType
- Link typeTaskLinkType
lag
- 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 thenArgumentNullException
will 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:
add
in interfaceCollection<TaskLink>
- Specified by:
add
in interfaceList<TaskLink>
- Overrides:
add
in classAbstractList<TaskLink>
- Parameters:
e
- The item to add.- Returns:
-
clear
public final void clear()
Reserved for internal usage.- Specified by:
clear
in interfaceCollection<TaskLink>
- Specified by:
clear
in interfaceList<TaskLink>
- Overrides:
clear
in classAbstractList<TaskLink>
-
get
public TaskLink get(int index)
(@inheritDoc}
-
getParentProject
public final Project getParentProject()
Gets the parent project of the ResourceAssignmentCollection object.- Returns:
- parent
Project
for this object.
-
remove
public final boolean remove(Object item)
Removes task link from a project.- Specified by:
remove
in interfaceCollection<TaskLink>
- Specified by:
remove
in interfaceList<TaskLink>
- Overrides:
remove
in classAbstractCollection<TaskLink>
- Parameters:
item
- the specified instance ofTaskLink
class to remove.- Returns:
- returns the instance of
TaskLink
class 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
TaskLinkCollection
object. Read onlyint
.- Specified by:
size
in interfaceCollection<TaskLink>
- Specified by:
size
in interfaceList<TaskLink>
- Specified by:
size
in classAbstractCollection<TaskLink>
- Returns:
- returns the number of objects contained in this collection.
-
sort
public void sort(Comparator<? super TaskLink> c)
-
-