Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

package gov.va.med.pbm.ampl.utility;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
* The Unit Enum manages the allowable units of measure.
*
* @author Ian Meinert
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum Unit {

/**
* The kilogram unit at node 5.
*/
KILOGRAM("kg", 5),

/**
* The pound unit at node 4.
*/
POUND("lb", 4),

/**
* The inch unit at node 3.
*/
INCH("in", 3),

/**
* The centimeter unit at node 2.
*/
CENTIMETER("cm", 2),

/**
* The celsius unit at node 1.
*/
CELSIUS("C", 1),

/**
* The Fahrenheit unit at node 0.
*/
FAHRENHEIT("F", 0);

private String abbreviation;

private int node;

/**
* The overloaded constructor requiring a abbreviation and node parameter.
*
* @param abbreviation the String abbreviation measurement
* @param node the int value of the node of abbreviation
*/
Unit(String abbreviation, int node) {
this.node = node;
this.abbreviation = abbreviation;
}

/**
* The getter for node.
*
* @return node
*/
public int getValue() {
return node;
}

/**
* The getter for abbreviation.
*
* @return abbreviation
*/
public String getAbbreviation() {
return abbreviation;
}
}