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
TimephasedDataobjects.
-
-
Constructor Summary
Constructors Constructor Description TimephasedDataCollection()Initializes a new instance of theTimephasedDataCollectionclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(TimephasedData item)AddsTimephasedDatainstance to this collection object.voidaddRange(Iterable<TimephasedData> timephasedCollection)Adds a collection ofTimephasedDatainstances to this collection object.voidclear()Removes all items from theTimephasedDataCollection.booleancontainsItem(TimephasedData item)Determines whether theTimephasedDataCollectioncontains a specific value.voidcopyToTArray(TimephasedData[] array, int arrayIndex)Copies the elements of theTimephasedDataCollectionto anArray, starting at a particularArrayindex.TimephasedDataget(int index)booleanisReadOnly()Gets a value indicating whether theSystem.Collections.Generic.ICollection{T}is read-only.Iterator<TimephasedData>iterator()Returns an iterator for this collection.booleanremove(TimephasedData item)RemovesTimephasedDatainstance from this collection object.List<TimephasedData>selectBetweenStartAndFinish(int timephasedDataType, Date startTime, Date finishTime)Selects all time phases betweenstartTimeandfinishTime.intsize()Gets the number of objects contained in thisTimephasedDataCollectionobject.voidsort(Comparator<? super T> c)List<TimephasedData>toList()Converts theTimephasedDataCollectionobject to a list ofTimephasedDataobjects.-
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
TimephasedDataCollectionclass.
-
-
Method Detail
-
add
public final boolean add(TimephasedData item)
Adds
TimephasedDatainstance to this collection object.- Specified by:
addin interfaceCollection<TimephasedData>- Specified by:
addin interfaceList<TimephasedData>- Overrides:
addin 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
TimephasedDatainstances to this collection object.- Parameters:
timephasedCollection- A collection ofTimephasedDataobjects to add.
-
clear
public final void clear()
Removes all items from the
TimephasedDataCollection.- Specified by:
clearin interfaceCollection<TimephasedData>- Specified by:
clearin interfaceList<TimephasedData>- Overrides:
clearin classAbstractList<TimephasedData>
-
containsItem
public final boolean containsItem(TimephasedData item)
Determines whether the
TimephasedDataCollectioncontains a specific value.- Parameters:
item- The object to locate in the collection.- Returns:
- true if
itemis found in the collection; otherwise, false.
-
copyToTArray
public final void copyToTArray(TimephasedData[] array, int arrayIndex)
Copies the elements of the
TimephasedDataCollectionto anArray, starting at a particularArrayindex.- Parameters:
array- The one-dimensionalArraythat is the destination of the elements copied fromTimephasedDataCollection. TheArraymust have zero-based indexing.arrayIndex- The zero-based index inarrayat which copying begins.- Throws:
com.aspose.ms.System.ArgumentNullException-arrayis null.ArgumentOutOfRangeException-arrayIndexis less than 0.ArgumentException- The number of elements in the sourceTimephasedDataCollectionis greater than the available space fromarrayIndexto 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:
iteratorin interfaceCollection<TimephasedData>- Specified by:
iteratorin interfaceIterable<TimephasedData>- Specified by:
iteratorin interfaceList<TimephasedData>- Overrides:
iteratorin classAbstractList<TimephasedData>- Returns:
- an iterator for this collection.
-
remove
public final boolean remove(TimephasedData item)
Removes
TimephasedDatainstance from this collection object.- Parameters:
item- The item to remove.- Returns:
- true if
itemwas successfully removed from theTimephasedDataCollection; otherwise, false. This method also returns false ifitemis not found in theTimephasedDataCollection.
-
selectBetweenStartAndFinish
public final List<TimephasedData> selectBetweenStartAndFinish(int timephasedDataType, Date startTime, Date finishTime)
Selects all time phases between
startTimeandfinishTime. 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
TimephasedDataCollectiondata ordered by Start property.
-
size
public final int size()
Gets the number of objects contained in this
TimephasedDataCollectionobject.- Specified by:
sizein interfaceCollection<TimephasedData>- Specified by:
sizein interfaceList<TimephasedData>- Specified by:
sizein classAbstractCollection<TimephasedData>- Returns:
- the number of objects contained in this
TimephasedDataCollectionobject.
-
toList
public final List<TimephasedData> toList()
Converts the
TimephasedDataCollectionobject to a list ofTimephasedDataobjects.- Returns:
- List of
TimephasedDataobjects.
-
get
public TimephasedData get(int index)
- Specified by:
getin interfaceList<TimephasedData>- Specified by:
getin classAbstractList<TimephasedData>- Parameters:
index-- Returns:
-
sort
public void sort(Comparator<? super T> c)
- Parameters:
c-
-
-