|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectjava.util.Observable
net.sourceforge.eclipsetrader.core.db.PersistentObject
net.sourceforge.eclipsetrader.core.db.History
Historical data.
| Constructor Summary | |
|---|---|
History()
Constructs an empty history object. |
|
History(java.lang.Integer id)
Constructs an empty history object with the given unique id. |
|
| Method Summary | |
|---|---|
int |
add(Bar obj)
Adds the specified element to this history, in date ascending order. |
void |
addAll(java.util.Collection collection)
Adds all of the elements in the specified collection to this list, in date ascending order. |
void |
clear()
Removes all of the elements from this history. |
Bar |
get(java.util.Date date)
Returns the element with the specified date. |
Bar |
get(int index)
Returns the element at the specified position in this list. |
Bar |
getFirst()
Returns the first element in this history. |
Bar |
getLast()
Returns the last element in this history. |
java.util.List |
getList()
Returns an unmodifiable list of the elements in this history. |
int |
indexOf(java.util.Date date)
Returns the index in this list of the first occurrence of the specified date, or -1 if this list does not contain this date. |
boolean |
isEmpty()
Returns true if this history contains no elements. |
java.util.Iterator |
iterator()
Returns an iterator over the elements in this history in proper sequence. |
boolean |
remove(Bar obj)
Removes the first occurrence in this list of the specified element. |
Bar |
remove(int index)
Removes the element at the specified position in this list. |
int |
size()
Returns the number of elements in this history. |
Bar[] |
toArray()
Returns an array containing all of the elements in this history in proper sequence. |
| Methods inherited from class net.sourceforge.eclipsetrader.core.db.PersistentObject |
|---|
clearChanged, equals, getData, getId, getRepository, setChanged, setData, setId, setRepository |
| Methods inherited from class java.util.Observable |
|---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public History()
public History(java.lang.Integer id)
id - the unique id of this object| Method Detail |
public int add(Bar obj)
obj - element to be added to this list.
java.lang.IllegalArgumentException - if the specified element is null.public void addAll(java.util.Collection collection)
collection - collection whose elements are to be added to this list.public Bar remove(int index)
index - the index of the element to removed.
java.lang.IndexOutOfBoundsException - if the index is out of range (index
< 0 || index >= size()).public boolean remove(Bar obj)
obj - element to be removed from this list, if present.
java.lang.IllegalArgumentException - if the specified element is null.public void clear()
public int size()
public Bar get(int index)
index - index of element to return.
java.lang.IndexOutOfBoundsException - if the index is out of range (index
< 0 || index >= size()).public Bar getFirst()
public Bar getLast()
public Bar get(java.util.Date date)
date - the date of the element.
public int indexOf(java.util.Date date)
date - date to search for.
public java.util.Iterator iterator()
public boolean isEmpty()
public java.util.List getList()
public Bar[] toArray()
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||