Package com.aspose.tasks
Class WorkingTimeCollection
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<T>
-
- com.aspose.tasks.WorkingTimeCollection
-
- All Implemented Interfaces:
Iterable<WorkingTime>,Collection<WorkingTime>,List<WorkingTime>
public class WorkingTimeCollection extends AbstractList<T>
Represents a collection of
WorkingTimeCollectionobjects.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, WorkingTime element)Inserts the specified element at the specified position in this list.booleanadd(WorkingTime e)voidclear()Removes allWorkingTimeitems from collection.booleancontains(Object item)Checks if the specified element is in the List.WorkingTimeget(int index)(@inheritDoc}intindexOf(WorkingTime item)Returns the index of the first occurrence of a given item in a listWorkingTimeremove(int index)Removes the element at the specified position in this list.booleanremove(Object item)RemovesWorkingTimeinstance from this collection.intsize()Gets the number of objects contained in thisWorkingTimeCollectionobject.voidsort(Comparator<? super WorkingTime> c)List<WorkingTime>toList()Converts the WorkingTimeCollection object to a list ofWorkingTimeobjects.-
Methods inherited from class java.util.AbstractList
addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, 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, containsAll, isEmpty, removeAll, replaceAll, retainAll, spliterator, toArray, toArray
-
-
-
-
Method Detail
-
add
public final boolean add(WorkingTime e)
- Specified by:
addin interfaceCollection<WorkingTime>- Specified by:
addin interfaceList<WorkingTime>- Overrides:
addin classAbstractList<WorkingTime>- Parameters:
e-- Returns:
-
clear
public final void clear()
Removes all
WorkingTimeitems from collection.- Specified by:
clearin interfaceCollection<WorkingTime>- Specified by:
clearin interfaceList<WorkingTime>- Overrides:
clearin classAbstractList<WorkingTime>
-
contains
public final boolean contains(Object item)
Checks if the specified element is in the List. Performs a linear O(n) search.
- Specified by:
containsin interfaceCollection<WorkingTime>- Specified by:
containsin interfaceList<WorkingTime>- Overrides:
containsin classAbstractCollection<WorkingTime>- Parameters:
item- the specified item.- Returns:
- True, if specified element found in the list, false otherwise.
-
indexOf
public final int indexOf(WorkingTime item)
Returns the index of the first occurrence of a given item in a list
- Parameters:
item- value to search for.- Returns:
- the index of the item
-
remove
public final boolean remove(Object item)
RemovesWorkingTimeinstance from this collection.- Specified by:
removein interfaceCollection<WorkingTime>- Specified by:
removein interfaceList<WorkingTime>- Overrides:
removein classAbstractCollection<WorkingTime>- Parameters:
item-WorkingTimeinstance to remove.- Returns:
- 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
WorkingTimeCollectionobject.- Specified by:
sizein interfaceCollection<WorkingTime>- Specified by:
sizein interfaceList<WorkingTime>- Specified by:
sizein classAbstractCollection<WorkingTime>- Returns:
- the number of objects contained in this
WorkingTimeCollectionobject.
-
sort
public final void sort(Comparator<? super WorkingTime> c)
- Specified by:
sortin interfaceList<WorkingTime>- Parameters:
c-
-
toList
public final List<WorkingTime> toList()
Converts the WorkingTimeCollection object to a list of
WorkingTimeobjects.- Returns:
- List of
WorkingTimeobjects.
-
add
public void add(int index, WorkingTime element)Inserts the specified element at the specified position in this list.- Specified by:
addin interfaceList<WorkingTime>- Overrides:
addin classAbstractList<WorkingTime>- Parameters:
index-element-
-
get
public WorkingTime get(int index)
(@inheritDoc}- Specified by:
getin interfaceList<WorkingTime>- Specified by:
getin classAbstractList<WorkingTime>- Parameters:
index-- Returns:
-
remove
public WorkingTime remove(int index)
Removes the element at the specified position in this list.- Specified by:
removein interfaceList<WorkingTime>- Overrides:
removein classAbstractList<WorkingTime>- Parameters:
index-- Returns:
-
-