public final class TestStatisticsMap extends Object implements Externalizable
StatisticsSet
s.
Test statistics synchronisation occurs at the granularity of the
contained StatisticsSet
instances. The map is synchronised
on the TestStatisticsMap
itself.
Modifier and Type | Class and Description |
---|---|
class |
TestStatisticsMap.ForEach
Convenient visitor-like iteration.
|
Constructor and Description |
---|
TestStatisticsMap()
Externalizable classes need a public default constructor.
|
TestStatisticsMap(StatisticsSetFactory statisticsSetFactory)
Creates a new
TestStatisticsMap instance. |
Modifier and Type | Method and Description |
---|---|
void |
add(TestStatisticsMap other)
Add the values in another
TestStatisticsMap to this
TestStatisticsMap . |
StatisticsSet |
compositeStatisticsTotals()
Add up all the composite statistics.
|
boolean |
equals(Object o)
Implement value based equality.
|
int |
hashCode()
Defer to
Object.hashCode() . |
StatisticsSet |
nonCompositeStatisticsTotals()
Add up all the non-composite statistics.
|
void |
put(Test test,
StatisticsSet statistics)
Put a new {test, statistics} pair in the map.
|
void |
readExternal(ObjectInput in)
Efficient externalisation method.
|
TestStatisticsMap |
reset()
Reset all our statistics and return a snapshot.
|
int |
size()
Return the number of entries in the
TestStatisticsMap . |
String |
toString()
Return a
String representation of this
TestStatisticsMap . |
void |
writeExternal(ObjectOutput out)
Efficient externalisation method.
|
public TestStatisticsMap(StatisticsSetFactory statisticsSetFactory)
TestStatisticsMap
instance.statisticsSetFactory
- A factory used to build StatisticsSet
s.public TestStatisticsMap()
public void put(Test test, StatisticsSet statistics)
test
- A test.statistics
- The test's statistics.public int size()
TestStatisticsMap
.int
valuepublic void add(TestStatisticsMap other)
TestStatisticsMap
to this
TestStatisticsMap
.other
- The other TestStatisticsMap
.public TestStatisticsMap reset()
public StatisticsSet nonCompositeStatisticsTotals()
public StatisticsSet compositeStatisticsTotals()
public boolean equals(Object o)
public int hashCode()
Object.hashCode()
.
We define hashCode
to keep Checkstyle happy, but
we don't use it.
public String toString()
String
representation of this
TestStatisticsMap
.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
- Handle to the output stream.IOException
- If an I/O error occurs.public void readExternal(ObjectInput in) throws IOException
readExternal
in interface Externalizable
in
- Handle to the input stream.IOException
- If an I/O error occurs.Copyright © 2000-2014. All Rights Reserved.