org.jboss.as.console.client.shared.runtime.Metric Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of switchyard-console-as7-core
Show all versions of switchyard-console-as7-core
Bundles the core AS7 console as a GWT module. Includes minor customizations to support extensions.
package org.jboss.as.console.client.shared.runtime;
import java.util.LinkedList;
import java.util.List;
/**
* @author Heiko Braun
* @date 11/3/11
*/
public class Metric {
private List values = new LinkedList();
public Metric(String... values) {
for(String s : values)
add(s);
}
public Metric(int... values) {
for(int i : values)
add(String.valueOf(i));
}
public Metric(long... values) {
for(long l : values)
add(String.valueOf(l));
}
public void add(String value)
{
values.add(value);
}
public String get(int i)
{
return values.get(i);
}
public List getValues() {
return values;
}
@Override
public String toString() {
return "Metric{" +
"values=" + values +
'}';
}
public int numSamples() {
return getValues().size();
}
}