Skip to content

Commit 36c6398

Browse files
authored
relax UnitType access, make it public (#295)
* relax UnitType access, make it public
1 parent 86cef37 commit 36c6398

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/main/java/com/arpnetworking/metrics/mad/model/UnitType.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,39 @@
2121
*
2222
* @author Ville Koskela (ville dot koskela at inscopemetrics dot io)
2323
*/
24-
/* package private */ enum UnitType {
24+
public enum UnitType {
25+
/**
26+
* Used in describing time durations.
27+
*/
2528
TIME {
2629
@Override
2730
public Unit getDefaultUnit() {
2831
return Unit.SECOND;
2932
}
3033
},
34+
/**
35+
* Used in describing data sizes.
36+
*/
3137
DATA_SIZE {
3238
@Override
3339
public Unit getDefaultUnit() {
3440
return Unit.BYTE;
3541
}
3642
},
43+
/**
44+
* Used in describing measurements of temperature.
45+
*/
3746
TEMPERATURE {
3847
@Override
3948
public Unit getDefaultUnit() {
4049
return Unit.KELVIN;
4150
}
4251
};
4352

53+
/**
54+
* Get the default unit for this unit type. Used in normalizing values.
55+
*
56+
* @return The default unit for a given domain.
57+
*/
4458
public abstract Unit getDefaultUnit();
4559
}

0 commit comments

Comments
 (0)