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

MethodDescription
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:

ParameterTypeDescription
eWorkingTime{@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:

ParameterTypeDescription
indexint{@inheritDoc}
elementWorkingTime{@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:

ParameterTypeDescription
itemjava.lang.Objectthe specified item.

Returns: boolean - True, if specified element found in the list, false otherwise.

get(int index)

public WorkingTime get(int index)

(@inheritDoc}

Parameters:

ParameterTypeDescription
indexint{@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:

ParameterTypeDescription
itemWorkingTimevalue 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:

ParameterTypeDescription
indexintan index to insert to
itemWorkingTimean element to insert

remove(int index)

public WorkingTime remove(int index)

Removes the element at the specified position in this list.

Parameters:

ParameterTypeDescription
indexint{@inheritDoc}

Returns: WorkingTime - {@inheritDoc}

remove(Object item)

public final boolean remove(Object item)

Removes WorkingTime instance from this collection.

Parameters:

ParameterTypeDescription
itemjava.lang.ObjectWorkingTime 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:

ParameterTypeDescription
cjava.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.