GLS ShipIT  2.8.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 
24 @XmlType(name = "ProductType")
25 @XmlEnum
26 public enum ProductType {
27 
28  @XmlEnumValue("Parcel")
29  PARCEL("Parcel"),
30  @XmlEnumValue("Express")
31  EXPRESS("Express"),
32  @XmlEnumValue("Freight")
33  FREIGHT("Freight");
34  private final String value;
35 
36  ProductType(String v) {
37  value = v;
38  }
39 
40  public String value() {
41  return value;
42  }
43 
44  public static ProductType fromValue(String v) {
45  for (ProductType c: ProductType.values()) {
46  if (c.value.equals(v)) {
47  return c;
48  }
49  }
50  throw new IllegalArgumentException(v);
51  }
52 
53 }