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
WorkingTimeCollection
objects.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, WorkingTime element)
Inserts the specified element at the specified position in this list.boolean
add(WorkingTime e)
void
clear()
Removes allWorkingTime
items from collection.boolean
contains(Object item)
Checks if the specified element is in the List.WorkingTime
get(int index)
(@inheritDoc}int
indexOf(WorkingTime item)
Returns the index of the first occurrence of a given item in a listvoid
insert(int index, WorkingTime item)
Inserts an element into this list at a given indexWorkingTime
remove(int index)
Removes the element at the specified position in this list.boolean
remove(Object item)
RemovesWorkingTime
instance from this collection.int
size()
Gets the number of objects contained in thisWorkingTimeCollection
object.void
sort(Comparator<? super WorkingTime> c)
List<WorkingTime>
toList()
Converts the WorkingTimeCollection object to a list ofWorkingTime
objects.-
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:
add
in interfaceCollection<WorkingTime>
- Specified by:
add
in interfaceList<WorkingTime>
- Overrides:
add
in classAbstractList<WorkingTime>
- Parameters:
e
-- Returns:
-
clear
public final void clear()
Removes all
WorkingTime
items from collection.- Specified by:
clear
in interfaceCollection<WorkingTime>
- Specified by:
clear
in interfaceList<WorkingTime>
- Overrides:
clear
in 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:
contains
in interfaceCollection<WorkingTime>
- Specified by:
contains
in interfaceList<WorkingTime>
- Overrides:
contains
in 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
-
insert
public final void insert(int index, WorkingTime item)
Inserts an element into this list at a given index
- Parameters:
index
- an index to insert toitem
- an element to insert
-
remove
public final boolean remove(Object item)
RemovesWorkingTime
instance from this collection.- Specified by:
remove
in interfaceCollection<WorkingTime>
- Specified by:
remove
in interfaceList<WorkingTime>
- Overrides:
remove
in classAbstractCollection<WorkingTime>
- Parameters:
item
-WorkingTime
instance 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
WorkingTimeCollection
object.- Specified by:
size
in interfaceCollection<WorkingTime>
- Specified by:
size
in interfaceList<WorkingTime>
- Specified by:
size
in classAbstractCollection<WorkingTime>
- Returns:
- the number of objects contained in this
WorkingTimeCollection
object.
-
sort
public final void sort(Comparator<? super WorkingTime> c)
- Specified by:
sort
in interfaceList<WorkingTime>
- Parameters:
c
-
-
toList
public final List<WorkingTime> toList()
Converts the WorkingTimeCollection object to a list of
WorkingTime
objects.- Returns:
- List of
WorkingTime
objects.
-
add
public void add(int index, WorkingTime element)
Inserts the specified element at the specified position in this list.- Specified by:
add
in interfaceList<WorkingTime>
- Overrides:
add
in classAbstractList<WorkingTime>
- Parameters:
index
-element
-
-
get
public WorkingTime get(int index)
(@inheritDoc}- Specified by:
get
in interfaceList<WorkingTime>
- Specified by:
get
in classAbstractList<WorkingTime>
- Parameters:
index
-- Returns:
-
remove
public WorkingTime remove(int index)
Removes the element at the specified position in this list.- Specified by:
remove
in interfaceList<WorkingTime>
- Overrides:
remove
in classAbstractList<WorkingTime>
- Parameters:
index
-- Returns:
-
-