public class MetricsData extends WidgetData
Modifier and Type | Class and Description |
---|---|
static class |
MetricsData.Builder
Builder to make widget data construction easier.
|
Constructor and Description |
---|
MetricsData()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntityId(long entityId)
Adds the given entity id to the list of entities for the widget.
|
void |
addMetric(Metric metric)
Adds the given metric to the list of metrics for the widget.
|
static MetricsData.Builder |
builder()
Returns a builder for the widget data.
|
int |
getDuration()
Returns the duration of the metrics.
|
long |
getEndTime()
Returns the end time of the metrics.
|
List<Long> |
getEntityIds()
Returns the list of entities for the widget.
|
int |
getLimit()
Returns the limit of the metrics.
|
List<Metric> |
getMetrics()
Returns the list of metrics for the widget.
|
String |
getOrderBy()
Returns the order by of the metrics.
|
void |
setDuration(int duration)
Sets the duration of the metrics.
|
void |
setEndTime(long endTime)
Sets the end time of the metrics.
|
void |
setEntityIds(List<Long> entityIds)
Sets the list of entities for the widget.
|
void |
setLimit(int limit)
Sets the limit of the metrics.
|
void |
setMetrics(List<Metric> metrics)
Sets the list of metrics for the widget.
|
void |
setOrderBy(Metric.Value orderBy)
Sets the order by of the metrics.
|
void |
setOrderBy(String orderBy)
Sets the order by of the metrics.
|
String |
toString()
Returns a string representation of the object.
|
public void setDuration(int duration)
duration
- The duration of the metricspublic int getDuration()
public void setEndTime(long endTime)
endTime
- The end time of the metricspublic long getEndTime()
public void setEntityIds(List<Long> entityIds)
entityIds
- The list of entities for the widgetpublic void addEntityId(long entityId)
entityId
- The entity id to add to the list of entitiespublic List<Long> getEntityIds()
public void setMetrics(List<Metric> metrics)
metrics
- The list of metrics for the widgetpublic void addMetric(Metric metric)
metric
- The metric to add to the list of metricspublic List<Metric> getMetrics()
public void setOrderBy(String orderBy)
orderBy
- The order by of the metricspublic void setOrderBy(Metric.Value orderBy)
orderBy
- The order by of the metricspublic String getOrderBy()
public void setLimit(int limit)
limit
- The limit of the metricspublic int getLimit()
public String toString()
public static MetricsData.Builder builder()
Copyright © 2018. All rights reserved.