public class Correlation<RecordType>
extends java.lang.Object
Constructor and Description |
---|
Correlation(java.util.Map<java.lang.String,RecordType> newRecordTable,
UnivariateStatistics newTimeStatistics)
Creates new Correlation
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Correlation<RecordType> correlation)
Check whether this correlation contains all of the records of a specified correlation.
|
RecordType |
getRecord(java.lang.String name)
Get the record identified by the source name (same one registered with the correlator).
|
java.util.Collection<RecordType> |
getRecords()
Get a collection of the records in the correlation.
|
boolean |
isCorrelated(java.lang.String sourceName)
Check if the named source is among the correlated.
|
java.util.Date |
meanDate()
Convenience method to get a Java date for a given time stamp by averaging the dates of the records.
|
double |
meanTimeInSeconds()
Average time of the time stamps from the records in seconds since the Java epoch
|
java.util.Collection<java.lang.String> |
names()
Get the collection of names each of which identifies a record.
|
int |
numRecords()
Get the number of records correlated.
|
java.lang.String |
toString()
String representation of the correlation useful for printing
|
public Correlation(java.util.Map<java.lang.String,RecordType> newRecordTable, UnivariateStatistics newTimeStatistics)
public boolean isCorrelated(java.lang.String sourceName)
sourceName
- A name uniquely identifying a source (and record)public int numRecords()
public java.util.Collection<java.lang.String> names()
public final java.util.Collection<RecordType> getRecords()
getRecord(java.lang.String)
public final RecordType getRecord(java.lang.String name)
name
- The name that identifies the desired record.public boolean contains(Correlation<RecordType> correlation)
correlation
- The correlation to test for being contained within this
public double meanTimeInSeconds()
public java.util.Date meanDate()
public java.lang.String toString()
toString
in class java.lang.Object