GLS ShipIT  2.7.11
GLS ShipIT - REST services
ProductType.java
Go to the documentation of this file.
1 
2 package eu.glsgroup.fpcs.datatypes.soap.v1.common;
3 
4 import javax.xml.bind.annotation.XmlEnum;
5 import javax.xml.bind.annotation.XmlEnumValue;
6 import javax.xml.bind.annotation.XmlType;
7 
8 
25 @XmlType(name = "ProductType")
26 @XmlEnum
27 public enum ProductType {
28 
29  @XmlEnumValue("Parcel")
30  PARCEL("Parcel"),
31  @XmlEnumValue("Express")
32  EXPRESS("Express"),
33  @XmlEnumValue("Freight")
34  FREIGHT("Freight");
35  private final String value;
36 
37  ProductType(String v) {
38  value = v;
39  }
40 
41  public String value() {
42  return value;
43  }
44 
45  public static ProductType fromValue(String v) {
46  for (ProductType c: ProductType.values()) {
47  if (c.value.equals(v)) {
48  return c;
49  }
50  }
51  throw new IllegalArgumentException(v);
52  }
53 
54 }