Class TimephasedDataCollection
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<T>
-
- com.aspose.tasks.TimephasedDataCollection
-
- All Implemented Interfaces:
Iterable<TimephasedData>
,Collection<TimephasedData>
,List<TimephasedData>
public abstract class TimephasedDataCollection extends AbstractList<T>
Represents a collection of
TimephasedData
objects.
-
-
Constructor Summary
Constructors Constructor Description TimephasedDataCollection()
Initializes a new instance of theTimephasedDataCollection
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(TimephasedData item)
AddsTimephasedData
instance to this collection object.void
addRange(Iterable<TimephasedData> timephasedCollection)
Adds a collection ofTimephasedData
instances to this collection object.void
clear()
Removes all items from theTimephasedDataCollection
.boolean
containsItem(TimephasedData item)
Determines whether theTimephasedDataCollection
contains a specific value.void
copyToTArray(TimephasedData[] array, int arrayIndex)
Copies the elements of theTimephasedDataCollection
to anArray
, starting at a particularArray
index.TimephasedData
get(int index)
boolean
isReadOnly()
Gets a value indicating whether the System.Collections.Generic.ICollection<T> is read-only.Iterator<TimephasedData>
iterator()
Returns an iterator for this collection.boolean
remove(TimephasedData item)
RemovesTimephasedData
instance from this collection object.List<TimephasedData>
selectBetweenStartAndFinish(int timephasedDataType, Date startTime, Date finishTime)
Selects all time phases betweenstartTime
andfinishTime
.int
size()
Gets the number of objects contained in thisTimephasedDataCollection
object.void
sort(Comparator<? super T> c)
List<TimephasedData>
toList()
Converts theTimephasedDataCollection
object to a list ofTimephasedData
objects.-
Methods inherited from class java.util.AbstractList
add, addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, spliterator, toArray, toArray
-
-
-
-
Constructor Detail
-
TimephasedDataCollection
public TimephasedDataCollection()
Initializes a new instance of the
TimephasedDataCollection
class.
-
-
Method Detail
-
add
public final boolean add(TimephasedData item)
Adds
TimephasedData
instance to this collection object.- Specified by:
add
in interfaceCollection<TimephasedData>
- Specified by:
add
in interfaceList<TimephasedData>
- Overrides:
add
in classAbstractList<TimephasedData>
- Parameters:
item
- The item to add.- Returns:
- true, if item was added; otherwise false.
- Throws:
com.aspose.ms.System.ArgumentNullException
- if parameter td is null.
-
addRange
public final void addRange(Iterable<TimephasedData> timephasedCollection)
Adds a collection of
TimephasedData
instances to this collection object.- Parameters:
timephasedCollection
- A collection ofTimephasedData
objects to add.
-
clear
public final void clear()
Removes all items from the
TimephasedDataCollection
.- Specified by:
clear
in interfaceCollection<TimephasedData>
- Specified by:
clear
in interfaceList<TimephasedData>
- Overrides:
clear
in classAbstractList<TimephasedData>
-
containsItem
public final boolean containsItem(TimephasedData item)
Determines whether the
TimephasedDataCollection
contains a specific value.- Parameters:
item
- The object to locate in the collection.- Returns:
- true if
item
is found in the collection; otherwise, false.
-
copyToTArray
public final void copyToTArray(TimephasedData[] array, int arrayIndex)
Copies the elements of the
TimephasedDataCollection
to anArray
, starting at a particularArray
index.- Parameters:
array
- The one-dimensionalArray
that is the destination of the elements copied fromTimephasedDataCollection
. TheArray
must have zero-based indexing.arrayIndex
- The zero-based index inarray
at which copying begins.- Throws:
com.aspose.ms.System.ArgumentNullException
-array
is null.ArgumentOutOfRangeException
-arrayIndex
is less than 0.ArgumentException
- The number of elements in the sourceTimephasedDataCollection
is greater than the available space fromarrayIndex
to the end of the destinationarray
.
-
isReadOnly
public final boolean isReadOnly()
Gets a value indicating whether the System.Collections.Generic.ICollection<T> is read-only.
- Returns:
- true if the System.Collections.Generic.ICollection<T> is read-only; otherwise, false.
-
iterator
public final Iterator<TimephasedData> iterator()
Returns an iterator for this collection.
- Specified by:
iterator
in interfaceCollection<TimephasedData>
- Specified by:
iterator
in interfaceIterable<TimephasedData>
- Specified by:
iterator
in interfaceList<TimephasedData>
- Overrides:
iterator
in classAbstractList<TimephasedData>
- Returns:
- an iterator for this collection.
-
remove
public final boolean remove(TimephasedData item)
Removes
TimephasedData
instance from this collection object.- Parameters:
item
- The item to remove.- Returns:
- true if
item
was successfully removed from theTimephasedDataCollection
; otherwise, false. This method also returns false ifitem
is not found in theTimephasedDataCollection
.
-
selectBetweenStartAndFinish
public final List<TimephasedData> selectBetweenStartAndFinish(int timephasedDataType, Date startTime, Date finishTime)
Selects all time phases between
startTime
andfinishTime
. Has O(log n) complexity in average case.- Parameters:
timephasedDataType
- Type of time phases to select.startTime
- Interval's start.finishTime
- Interval's finish.- Returns:
- Returns new list instance of
TimephasedDataCollection
data ordered by Start property.
-
size
public final int size()
Gets the number of objects contained in this
TimephasedDataCollection
object.- Specified by:
size
in interfaceCollection<TimephasedData>
- Specified by:
size
in interfaceList<TimephasedData>
- Specified by:
size
in classAbstractCollection<TimephasedData>
- Returns:
- the number of objects contained in this
TimephasedDataCollection
object.
-
toList
public final List<TimephasedData> toList()
Converts the
TimephasedDataCollection
object to a list ofTimephasedData
objects.- Returns:
- List of
TimephasedData
objects.
-
get
public TimephasedData get(int index)
- Specified by:
get
in interfaceList<TimephasedData>
- Specified by:
get
in classAbstractList<TimephasedData>
- Parameters:
index
-- Returns:
-
sort
public void sort(Comparator<? super T> c)
- Parameters:
c
-
-
-