Package com.aspose.tasks
Class AvailabilityPeriodCollection
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<T>
-
- com.aspose.tasks.AvailabilityPeriodCollection
-
- All Implemented Interfaces:
Iterable<AvailabilityPeriod>
,Collection<AvailabilityPeriod>
,List<AvailabilityPeriod>
public class AvailabilityPeriodCollection extends AbstractList<T>
Represents a collection which contains
AvailabilityPeriod
objects.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(AvailabilityPeriod item)
Adds the specified item to this collection.void
clear()
Removes all items from this collection.boolean
contains(Object item)
Returns true if the specified item is found in this collection; otherwise, false.AvailabilityPeriod
get(int index)
Gets the parentResource
for this object.Resource
getParentResource()
Gets the parentResource
for this object.int
indexOf(Object item)
Determines the index of the specified item in this collection.Iterator<AvailabilityPeriod>
iterator()
Returns an iterator for this collection.AvailabilityPeriod
remove(int index)
Removes the element at the specified position in this collection and returns the element that was removed from the collection.boolean
remove(Object item)
Removes the first occurrence of a specific object from this collection.AvailabilityPeriod
set(int index, AvailabilityPeriod item)
Replaces the element at the specified position in this list with the specified element.int
size()
Returns the number of elements in this collection.void
sort(Comparator<? super T> c)
-
Methods inherited from class java.util.AbstractList
add, addAll, equals, hashCode, lastIndexOf, listIterator, listIterator, 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(AvailabilityPeriod item)
Adds the specified item to this collection.
- Specified by:
add
in interfaceCollection<AvailabilityPeriod>
- Specified by:
add
in interfaceList<AvailabilityPeriod>
- Overrides:
add
in classAbstractList<AvailabilityPeriod>
- Parameters:
item
- the specified item to add to this collection.- Returns:
- true if the specified item was added successfully; otherwise, false.
-
clear
public final void clear()
Removes all items from this collection.
- Specified by:
clear
in interfaceCollection<AvailabilityPeriod>
- Specified by:
clear
in interfaceList<AvailabilityPeriod>
- Overrides:
clear
in classAbstractList<AvailabilityPeriod>
-
contains
public final boolean contains(Object item)
Returns true if the specified item is found in this collection; otherwise, false.
- Specified by:
contains
in interfaceCollection<AvailabilityPeriod>
- Specified by:
contains
in interfaceList<AvailabilityPeriod>
- Overrides:
contains
in classAbstractCollection<AvailabilityPeriod>
- Parameters:
item
- the specified item to find.- Returns:
- true if the specified item is found in this collection; otherwise, false.
-
getParentResource
public final Resource getParentResource()
Gets the parent
Resource
for this object.- Returns:
- Parent
Resource
object for this collection.
-
indexOf
public final int indexOf(Object item)
Determines the index of the specified item in this collection.
- Specified by:
indexOf
in interfaceList<AvailabilityPeriod>
- Overrides:
indexOf
in classAbstractList<AvailabilityPeriod>
- Parameters:
item
- the specified item to locate in this collection.- Returns:
- the index of the specified item if found; otherwise, -1.
-
iterator
public Iterator<AvailabilityPeriod> iterator()
Returns an iterator for this collection.- Specified by:
iterator
in interfaceCollection<AvailabilityPeriod>
- Specified by:
iterator
in interfaceIterable<AvailabilityPeriod>
- Specified by:
iterator
in interfaceList<AvailabilityPeriod>
- Overrides:
iterator
in classAbstractList<AvailabilityPeriod>
- Returns:
- an iterator for this collection.
-
remove
public final boolean remove(Object item)
Removes the first occurrence of a specific object from this collection.
- Specified by:
remove
in interfaceCollection<AvailabilityPeriod>
- Specified by:
remove
in interfaceList<AvailabilityPeriod>
- Overrides:
remove
in classAbstractCollection<AvailabilityPeriod>
- Parameters:
item
- the specified object to remove.- Returns:
- true if the specified object was successfully removed from this collection; otherwise, false.
-
size
public final int size()
Returns the number of elements in this collection.- Specified by:
size
in interfaceCollection<AvailabilityPeriod>
- Specified by:
size
in interfaceList<AvailabilityPeriod>
- Specified by:
size
in classAbstractCollection<AvailabilityPeriod>
- Returns:
- the number of elements in this collection.
-
get
public AvailabilityPeriod get(int index)
Gets the parent
Resource
for this object.- Specified by:
get
in interfaceList<AvailabilityPeriod>
- Specified by:
get
in classAbstractList<AvailabilityPeriod>
- Parameters:
index
- specified position to getInternal element at.- Returns:
- the element at the specified position in this collection.
-
remove
public AvailabilityPeriod remove(int index)
Removes the element at the specified position in this collection and returns the element that was removed from the collection.- Specified by:
remove
in interfaceList<AvailabilityPeriod>
- Overrides:
remove
in classAbstractList<AvailabilityPeriod>
- Parameters:
index
- the specified position to remove the element at.- Returns:
- the element that was removed from the collection.
-
set
public AvailabilityPeriod set(int index, AvailabilityPeriod item)
Replaces the element at the specified position in this list with the specified element.- Specified by:
set
in interfaceList<AvailabilityPeriod>
- Overrides:
set
in classAbstractList<AvailabilityPeriod>
- Parameters:
index
- the specified position to replace element at.item
- the specified element to replace the element at the specified position.- Returns:
- the element replaced by the specified element at the specified position.
-
sort
public void sort(Comparator<? super T> c)
- Parameters:
c
-
-
-