public class TaskCollection extends AbstractList<Task>
Represents a collection of Task
objects.
Modifier and Type | Method and Description |
---|---|
Task |
add()
Adds new task to project tasks collection on the same outline level of the last task.
|
Task |
add(String taskName)
Adds a new task to children tasks collection.
|
Task |
add(String taskName,
int beforeTaskId)
Inserts a new task before a task with the specified id and on the same outline level.
|
boolean |
add(Task child)
Add the specified task to the instance of the
TaskCollection class. |
Task |
get(int index)
(@inheritDoc}
|
Task |
getById(int id)
Returns a task with the specified Id whose ancestor is parent task of this collection .
|
Task |
getByUid(int uid)
Returns a task with the specified Uid whose ancestor is parent task of this collection .
|
int |
getCount()
Deprecated.
Use size() instead.
|
Project |
getParentProject()
Gets the parent project of the TaskCollection object.
|
boolean |
isReadOnly()
Determines whether this collection is read only.
|
int |
size()
Returns the number of objects contained in the TaskCollection.
|
List<Task> |
toList()
Converts the TaskCollection object to a list of
Task objects. |
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
@Deprecated public int getCount()
Returns the number of objects contained in the TaskCollection.
public Project getParentProject()
Gets the parent project of the TaskCollection object.
public boolean isReadOnly()
Determines whether this collection is read only.
public boolean add(Task child)
TaskCollection
class.
If ParentProject.CalculationMode is None user should invoke Project.Recalculate() after using this method (It will reschedule all project tasks (start/finish dates, sets early/late dates) and calculate the dependent fields such as slacks, work and cost fields, ids and outline levels).
If ParentProject.CalculationMode is Manual the method will calculate only task id, outline level and outline numbers automatically.
If ParentProject.CalculationMode is Automatic the method reschedules all project's tasks automatically
(start/finish dates, sets early/late dates, calculates slacks, work and cost fields, recalculates ids and outline levels).add
in interface Collection<Task>
add
in interface List<Task>
add
in class AbstractList<Task>
child
- the specified task which should be added to this task collection.public Task get(int index)
public Task add(String taskName, int beforeTaskId)
Inserts a new task before a task with the specified id and on the same outline level.
taskName
- the specified task name.beforeTaskId
- int
the specified id of a task before which a new task will be inserted.com.aspose.ms.System.ArgumentOutOfRangeException
- is thrown if the specified id is not a valid task id.public Task add()
Adds new task to project tasks collection on the same outline level of the last task.
Task
class.public Task add(String taskName)
Adds a new task to children tasks collection.
taskName
- the specified task name.Task
class.public Task getById(int id)
Returns a task with the specified Id whose ancestor is parent task of this collection .
id
- TaskEntity IdTask
class with the specified id whose ancestor is parent task of this collection.public Task getByUid(int uid)
Returns a task with the specified Uid whose ancestor is parent task of this collection .
uid
- the specified task Uid.Task
class with the specified uid whose ancestor is parent task of this collection.public List<Task> toList()
Converts the TaskCollection object to a list of Task
objects.
Task
objects.public int size()
Returns the number of objects contained in the TaskCollection.
size
in interface Collection<Task>
size
in interface List<Task>
size
in class AbstractCollection<Task>
Copyright (c) 2008-2018 Aspose Pty Ltd. All Rights Reserved.