public abstract class DataPointList<T extends DataPoint> extends Object
DataPoint objects.| Constructor and Description |
|---|
DataPointList()
Creates a new, empty list of
DataPoint objects. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T toAdd)
Inserts the specified
DataPoint element into the list, ordered
by its last update time. |
protected void |
checkForEmptyList()
Checks for an empty list and a list with one element in it.
|
void |
clear()
Removes all of the
DataPoint elements from this list. |
boolean |
contains(T toFind)
Indicates whether this list contains an object equivalent to the
specified
DataPoint instance. |
protected List<T> |
getList()
Gets the list of
DataPoint objects. |
boolean |
isEmpty()
Indicates whether this list contains any
DataPoint elements. |
boolean |
remove(T toRemove)
|
int |
size()
Returns the number of
DataPoint elements in this list. |
abstract T |
summarize()
|
String |
toDebugString()
Gets a detailed representation of this object to facilitate debugging.
|
String |
toString() |
public DataPointList()
DataPoint objects.public void add(T toAdd)
DataPoint element into the list, ordered
by its last update time.IllegalArgumentException - if time spanned by the DataPoint
to be added overlaps with the time
spanned by another DataPoint in
the listprotected void checkForEmptyList()
throws UnsupportedOperationException
DataPoint then it is returned as the summary.UnsupportedOperationException - if the list is emptypublic void clear()
DataPoint elements from this list.public boolean contains(T toFind)
DataPoint instance.true if list contains an equivalent object, false otherwisepublic boolean isEmpty()
DataPoint elements.true if list is empty, false otherwisepublic boolean remove(T toRemove)
DataPoint object from this list; the list is unchanged if no such
DataPoint element is found.true if an equivalent DataPoint was removed,
false otherwisepublic int size()
DataPoint elements in this list.public abstract T summarize() throws UnsupportedOperationException
DataPoint elements contained within this list into
a single DataPoint instance that encompasses the entire time
frame spanned by the list contents.DataPoint encompassing contents of listUnsupportedOperationException - if the list is emptypublic String toDebugString()
Copyright © 2014. All Rights Reserved.