WorkingTimeCollection
Inheritance: java.lang.Object, java.util.AbstractCollection, java.util.AbstractList, com.aspose.tasks.AbstractList
All Implemented Interfaces: com.aspose.tasks.IReadOnlyWorkingTimeCollection
public class WorkingTimeCollection extends AbstractList<WorkingTime> implements IReadOnlyWorkingTimeCollection
Represents a collection of WorkingTimeCollection objects.
Methods
Method | Description |
---|---|
add(WorkingTime e) | {@inheritDoc} |
add(int index, WorkingTime element) | Inserts the specified element at the specified position in this list. |
clear() | Removes all WorkingTime items from collection. |
contains(Object item) | Checks if the specified element is in the List. |
get(int index) | (@inheritDoc} |
indexOf(WorkingTime item) | Returns the index of the first occurrence of a given item in a list |
insert(int index, WorkingTime item) | Inserts an element into this list at a given index |
remove(int index) | Removes the element at the specified position in this list. |
remove(Object item) | Removes WorkingTime instance from this collection. |
size() | Gets the number of objects contained in this WorkingTimeCollection object. |
sort(Comparator<? super WorkingTime> c) | {@inheritDoc} |
toList() | Converts the WorkingTimeCollection object to a list of WorkingTime objects. |
add(WorkingTime e)
public final boolean add(WorkingTime e)
Parameters:
Parameter | Type | Description |
---|---|---|
e | WorkingTime | {@inheritDoc} |
Returns: boolean - {@inheritDoc}
add(int index, WorkingTime element)
public void add(int index, WorkingTime element)
Inserts the specified element at the specified position in this list.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | {@inheritDoc} |
element | WorkingTime | {@inheritDoc} |
clear()
public final void clear()
Removes all WorkingTime items from collection.
contains(Object item)
public final boolean contains(Object item)
Checks if the specified element is in the List. Performs a linear O(n) search.
Parameters:
Parameter | Type | Description |
---|---|---|
item | java.lang.Object | the specified item. |
Returns: boolean - True, if specified element found in the list, false otherwise.
get(int index)
public WorkingTime get(int index)
(@inheritDoc}
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | {@inheritDoc} |
Returns: WorkingTime - {@inheritDoc}
indexOf(WorkingTime item)
public final int indexOf(WorkingTime item)
Returns the index of the first occurrence of a given item in a list
Parameters:
Parameter | Type | Description |
---|---|---|
item | WorkingTime | value to search for. |
Returns: int - the index of the item
insert(int index, WorkingTime item)
public final void insert(int index, WorkingTime item)
Inserts an element into this list at a given index
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | an index to insert to |
item | WorkingTime | an element to insert |
remove(int index)
public WorkingTime remove(int index)
Removes the element at the specified position in this list.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | {@inheritDoc} |
Returns: WorkingTime - {@inheritDoc}
remove(Object item)
public final boolean remove(Object item)
Removes WorkingTime
instance from this collection.
Parameters:
Parameter | Type | Description |
---|---|---|
item | java.lang.Object | WorkingTime instance to remove. |
Returns: boolean - true if WorkingTime instance was successfully removed from this collection; otherwise, false.
size()
public final int size()
Gets the number of objects contained in this WorkingTimeCollection object.
Returns: int - the number of objects contained in this WorkingTimeCollection object.
sort(Comparator<? super WorkingTime> c)
public final void sort(Comparator<? super WorkingTime> c)
Parameters:
Parameter | Type | Description |
---|---|---|
c | java.util.Comparator<? super com.aspose.tasks.WorkingTime> | {@inheritDoc} |
toList()
public final List<WorkingTime> toList()
Converts the WorkingTimeCollection object to a list of WorkingTime objects.
Returns: java.util.List<com.aspose.tasks.WorkingTime> - List of WorkingTime objects.