public static class TimeFrequencyHolder.TimeFrequency extends Object implements ReadWriteableBinary
Constructor and Description |
---|
TimeFrequency()
default
|
TimeFrequency(long time,
long frequency)
initialise, presumed to be at the beginning of some time period so
the cumulative == the period frequency
|
Modifier and Type | Method and Description |
---|---|
byte[] |
binaryHeader()
Header for binary input.
|
TimeFrequencyHolder.TimeFrequency |
combine(long l,
long nTweets) |
TimeFrequencyHolder.TimeFrequency |
combine(TimeFrequencyHolder.TimeFrequency other)
Given a
TimeFrequencyHolder.TimeFrequency instance, keep count of cumulative
frequency and set the periodFrequency to the one furthest along in
time |
void |
readBinary(DataInput in)
Read internal state from in.
|
String |
toString() |
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
public TimeFrequency()
public TimeFrequency(long time, long frequency)
time
- frequency
- public void readBinary(DataInput in) throws IOException
ReadableBinary
readBinary
in interface ReadableBinary
in
- source to read from.IOException
- an error reading inputpublic byte[] binaryHeader()
ReadableBinary
binaryHeader
in interface ReadableBinary
binaryHeader
in interface WriteableBinary
public void writeBinary(DataOutput out) throws IOException
WriteableBinary
writeBinary
in interface WriteableBinary
out
- sink to write toIOException
- an error writing to outpublic TimeFrequencyHolder.TimeFrequency combine(TimeFrequencyHolder.TimeFrequency other)
TimeFrequencyHolder.TimeFrequency
instance, keep count of cumulative
frequency and set the periodFrequency to the one furthest along in
timeother
- TimeFrequencyHolder.TimeFrequency
instancepublic TimeFrequencyHolder.TimeFrequency combine(long l, long nTweets)
l
- nTweets
- TimeFrequencyHolder.TimeFrequency
instance