Class ClientsHistory
- java.lang.Object
-
- org.torproject.metrics.onionoo.docs.ClientsHistory
-
- All Implemented Interfaces:
java.lang.Comparable<ClientsHistory>
public class ClientsHistory extends java.lang.Object implements java.lang.Comparable<ClientsHistory>
-
-
Constructor Summary
Constructors Constructor Description ClientsHistory(long startMillis, long endMillis, double totalResponses, java.util.SortedMap<java.lang.String,java.lang.Double> responsesByCountry, java.util.SortedMap<java.lang.String,java.lang.Double> responsesByTransport, java.util.SortedMap<java.lang.String,java.lang.Double> responsesByVersion)
Instantiates a new clients history object with given interval start and end, total responses, and responses by country, transport, and version.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addResponses(ClientsHistory other)
Adds responses from another clients history object to this one by summing up response numbers and extending interval start and/or end.int
compareTo(ClientsHistory other)
boolean
equals(java.lang.Object other)
static ClientsHistory
fromString(java.lang.String responseHistoryString)
Instantiates a new clients history object from the given string that may have been produced bytoString()
.long
getEndMillis()
java.util.SortedMap<java.lang.String,java.lang.Double>
getResponsesByCountry()
java.util.SortedMap<java.lang.String,java.lang.Double>
getResponsesByTransport()
java.util.SortedMap<java.lang.String,java.lang.Double>
getResponsesByVersion()
long
getStartMillis()
double
getTotalResponses()
int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
ClientsHistory
public ClientsHistory(long startMillis, long endMillis, double totalResponses, java.util.SortedMap<java.lang.String,java.lang.Double> responsesByCountry, java.util.SortedMap<java.lang.String,java.lang.Double> responsesByTransport, java.util.SortedMap<java.lang.String,java.lang.Double> responsesByVersion)
Instantiates a new clients history object with given interval start and end, total responses, and responses by country, transport, and version.
-
-
Method Detail
-
getStartMillis
public long getStartMillis()
-
getEndMillis
public long getEndMillis()
-
getTotalResponses
public double getTotalResponses()
-
getResponsesByCountry
public java.util.SortedMap<java.lang.String,java.lang.Double> getResponsesByCountry()
-
getResponsesByTransport
public java.util.SortedMap<java.lang.String,java.lang.Double> getResponsesByTransport()
-
getResponsesByVersion
public java.util.SortedMap<java.lang.String,java.lang.Double> getResponsesByVersion()
-
fromString
public static ClientsHistory fromString(java.lang.String responseHistoryString)
Instantiates a new clients history object from the given string that may have been produced bytoString()
.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
addResponses
public void addResponses(ClientsHistory other)
Adds responses from another clients history object to this one by summing up response numbers and extending interval start and/or end.
-
compareTo
public int compareTo(ClientsHistory other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<ClientsHistory>
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-