org.openqa.selenium.devtools.v90.performance.model.Metrics Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenium-devtools-v90 Show documentation
Show all versions of selenium-devtools-v90 Show documentation
Selenium automates browsers. That's it! What you do with that power is entirely up to you.
package org.openqa.selenium.devtools.v90.performance.model;
import org.openqa.selenium.Beta;
import org.openqa.selenium.json.JsonInput;
/**
* Current values of the metrics.
*/
public class Metrics {
private final java.util.List metrics;
private final java.lang.String title;
public Metrics(java.util.List metrics, java.lang.String title) {
this.metrics = java.util.Objects.requireNonNull(metrics, "metrics is required");
this.title = java.util.Objects.requireNonNull(title, "title is required");
}
/**
* Current values of the metrics.
*/
public java.util.List getMetrics() {
return metrics;
}
/**
* Timestamp title.
*/
public java.lang.String getTitle() {
return title;
}
private static Metrics fromJson(JsonInput input) {
java.util.List metrics = null;
java.lang.String title = null;
input.beginObject();
while (input.hasNext()) {
switch(input.nextName()) {
case "metrics":
metrics = input.read(new com.google.common.reflect.TypeToken>() {
}.getType());
break;
case "title":
title = input.nextString();
break;
default:
input.skipValue();
break;
}
}
input.endObject();
return new Metrics(metrics, title);
}
}