ALLINPUT
- The collection input typeSINGLEINPUT
- The type of a single data typeTIMESERIES
- the type of time series returnedINTERNALSERIES
- the type of time series heldpublic abstract class TimeSeriesCollection<ALLINPUT,SINGLEINPUT,TIMESERIES extends TimeSeriesCollection<ALLINPUT,SINGLEINPUT,TIMESERIES,INTERNALSERIES>,INTERNALSERIES extends TimeSeries<ALLINPUT,SINGLEINPUT,INTERNALSERIES>> extends TimeSeries<Map<String,ALLINPUT>,Map<String,SINGLEINPUT>,TIMESERIES>
Modifier and Type | Field and Description |
---|---|
protected HashMap<String,INTERNALSERIES> |
timeSeriesHolder |
Constructor and Description |
---|
TimeSeriesCollection()
initialise the underlying time series holder
|
Modifier and Type | Method and Description |
---|---|
void |
addTimeSeries(String name,
INTERNALSERIES series) |
Collection<INTERNALSERIES> |
allseries() |
TIMESERIES |
collectionByNames(Collection<String> names) |
TIMESERIES |
collectionByNames(String... names) |
<OUTPUTALL,OUTPUTSINGLE,OUTPUTTS extends TimeSeries<OUTPUTALL,OUTPUTSINGLE,OUTPUTTS>,OUTPUTTSC extends TimeSeriesCollection<OUTPUTALL,OUTPUTSINGLE,OUTPUTTSC,OUTPUTTS>> |
convertInternal(TimeSeriesConverter<ALLINPUT,SINGLEINPUT,INTERNALSERIES,OUTPUTALL,OUTPUTSINGLE,OUTPUTTS> tsc,
OUTPUTTSC inst) |
<OUTPUTALL,OUTPUTSINGLE,OUTPUTTS extends TimeSeries<OUTPUTALL,OUTPUTSINGLE,OUTPUTTS>,OUTPUTTSC extends TimeSeriesCollection<OUTPUTALL,OUTPUTSINGLE,OUTPUTTSC,OUTPUTTS>> |
convertInternal(TimeSeriesConverter<ALLINPUT,SINGLEINPUT,INTERNALSERIES,OUTPUTALL,OUTPUTSINGLE,OUTPUTTS> tsc,
TimeSeriesProcessor<OUTPUTALL,OUTPUTSINGLE,OUTPUTTS> tsp,
OUTPUTTSC inst) |
TIMESERIES |
get(long time,
int nbefore,
int nafter)
returns the DATA at a specific point in time and those before and after
to the number requested.
|
TIMESERIES |
get(long time,
int nbefore,
int nafter,
TIMESERIES output)
Same as
TimeSeries.get(long, int, int) but instead of createing the output
DATA instance, an existing data instance is handed which is filled. |
TIMESERIES |
get(long start,
long end)
returns the RETURNTYPE between the specified time periods.
|
TIMESERIES |
get(long time,
long threshbefore,
long threshafter)
returns the RETURNTYPE at a specific point in time and those before and
after within the specified thresholds.
|
Map<String,ALLINPUT> |
getData() |
Set<String> |
getNames() |
long[] |
getTimes() |
abstract INTERNALSERIES |
internalNewInstance() |
Iterator<IndependentPair<Long,Map<String,SINGLEINPUT>>> |
iterator() |
int |
nSeries() |
TIMESERIES |
processInternal(TimeSeriesProcessor<ALLINPUT,SINGLEINPUT,INTERNALSERIES> tsp)
process the internal series held by this collection with this processor
|
TIMESERIES |
processInternalInplace(TimeSeriesProcessor<ALLINPUT,SINGLEINPUT,INTERNALSERIES> tsp)
process the internal series held by this collection with this processor
|
INTERNALSERIES |
series(String name) |
void |
set(long[] time,
Map<String,ALLINPUT> data)
Set the data associated with each time.
|
int |
size() |
convert, convert, copy, get, internalAssign, internalAssign, newInstance, process, processInplace, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected HashMap<String,INTERNALSERIES extends TimeSeries<ALLINPUT,SINGLEINPUT,INTERNALSERIES>> timeSeriesHolder
public TimeSeriesCollection()
public void addTimeSeries(String name, INTERNALSERIES series) throws IncompatibleTimeSeriesException
name
- series
- IncompatibleTimeSeriesException
public INTERNALSERIES series(String name)
name
- the name of the seriespublic Collection<INTERNALSERIES> allseries()
public TIMESERIES get(long time, int nbefore, int nafter)
TimeSeries
Data should be returned in order
get
in class TimeSeries<Map<String,ALLINPUT>,Map<String,SINGLEINPUT>,TIMESERIES extends TimeSeriesCollection<ALLINPUT,SINGLEINPUT,TIMESERIES,INTERNALSERIES>>
public Map<String,ALLINPUT> getData()
getData
in class TimeSeries<Map<String,ALLINPUT>,Map<String,SINGLEINPUT>,TIMESERIES extends TimeSeriesCollection<ALLINPUT,SINGLEINPUT,TIMESERIES,INTERNALSERIES>>
public TIMESERIES get(long start, long end)
TimeSeries
Data should be returned in order
get
in class TimeSeries<Map<String,ALLINPUT>,Map<String,SINGLEINPUT>,TIMESERIES extends TimeSeriesCollection<ALLINPUT,SINGLEINPUT,TIMESERIES,INTERNALSERIES>>
public TIMESERIES get(long time, int nbefore, int nafter, TIMESERIES output)
TimeSeries
TimeSeries.get(long, int, int)
but instead of createing the output
DATA instance, an existing data instance is handed which is filled. For
convenience this output is also returned
Data should be returned in order
get
in class TimeSeries<Map<String,ALLINPUT>,Map<String,SINGLEINPUT>,TIMESERIES extends TimeSeriesCollection<ALLINPUT,SINGLEINPUT,TIMESERIES,INTERNALSERIES>>
public abstract INTERNALSERIES internalNewInstance()
public TIMESERIES get(long time, long threshbefore, long threshafter)
TimeSeries
Data should be returned in order
get
in class TimeSeries<Map<String,ALLINPUT>,Map<String,SINGLEINPUT>,TIMESERIES extends TimeSeriesCollection<ALLINPUT,SINGLEINPUT,TIMESERIES,INTERNALSERIES>>
public TIMESERIES collectionByNames(String... names)
names
- public TIMESERIES collectionByNames(Collection<String> names)
names
- public Set<String> getNames()
public int nSeries()
public TIMESERIES processInternal(TimeSeriesProcessor<ALLINPUT,SINGLEINPUT,INTERNALSERIES> tsp)
tsp
- public TIMESERIES processInternalInplace(TimeSeriesProcessor<ALLINPUT,SINGLEINPUT,INTERNALSERIES> tsp)
tsp
- public <OUTPUTALL,OUTPUTSINGLE,OUTPUTTS extends TimeSeries<OUTPUTALL,OUTPUTSINGLE,OUTPUTTS>,OUTPUTTSC extends TimeSeriesCollection<OUTPUTALL,OUTPUTSINGLE,OUTPUTTSC,OUTPUTTS>> OUTPUTTSC convertInternal(TimeSeriesConverter<ALLINPUT,SINGLEINPUT,INTERNALSERIES,OUTPUTALL,OUTPUTSINGLE,OUTPUTTS> tsc, OUTPUTTSC inst)
OUTPUTALL
- OUTPUTSINGLE
- OUTPUTTS
- OUTPUTTSC
- tsc
- the method to convert each iteminst
- the instance to be filledpublic <OUTPUTALL,OUTPUTSINGLE,OUTPUTTS extends TimeSeries<OUTPUTALL,OUTPUTSINGLE,OUTPUTTS>,OUTPUTTSC extends TimeSeriesCollection<OUTPUTALL,OUTPUTSINGLE,OUTPUTTSC,OUTPUTTS>> OUTPUTTSC convertInternal(TimeSeriesConverter<ALLINPUT,SINGLEINPUT,INTERNALSERIES,OUTPUTALL,OUTPUTSINGLE,OUTPUTTS> tsc, TimeSeriesProcessor<OUTPUTALL,OUTPUTSINGLE,OUTPUTTS> tsp, OUTPUTTSC inst)
OUTPUTALL
- OUTPUTSINGLE
- OUTPUTTS
- OUTPUTTSC
- tsc
- the method to convert each itemtsp
- a processor to apply during conversioninst
- the instance to be filledpublic Iterator<IndependentPair<Long,Map<String,SINGLEINPUT>>> iterator()
public long[] getTimes()
getTimes
in class TimeSeries<Map<String,ALLINPUT>,Map<String,SINGLEINPUT>,TIMESERIES extends TimeSeriesCollection<ALLINPUT,SINGLEINPUT,TIMESERIES,INTERNALSERIES>>
public int size()
size
in class TimeSeries<Map<String,ALLINPUT>,Map<String,SINGLEINPUT>,TIMESERIES extends TimeSeriesCollection<ALLINPUT,SINGLEINPUT,TIMESERIES,INTERNALSERIES>>
public void set(long[] time, Map<String,ALLINPUT> data) throws TimeSeriesSetException
TimeSeries
set
in class TimeSeries<Map<String,ALLINPUT>,Map<String,SINGLEINPUT>,TIMESERIES extends TimeSeriesCollection<ALLINPUT,SINGLEINPUT,TIMESERIES,INTERNALSERIES>>
time
- instances of timedata
- instances of dataTimeSeriesSetException