blob: f4a61f85de677e09d701d04b2814a9beed009223 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.log.event;
/**
*
* @author <a href="mailto:borud@yahoo-inc.com">Bjorn Borud</a>
*/
public class Count extends Event {
public Count () {
}
public Count (String name, double value) {
setValue("name", name);
setValue("value", Double.toString(value));
}
/**
* Set a property.
*
* @param name The name of the property
* @param value The value of the property
*/
@Override
public Event setValue (String name, String value) {
if (name.equals("value")) {
super.setValue(name, Long.toString((new Double(value)).longValue()));
} else {
super.setValue(name , value);
}
return this;
}
}
|