View Javadoc

1   //
2   // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-01/24/2006 06:15 PM(kohsuke)-fcs 
3   // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4   // Any modifications to this file will be lost upon recompilation of the source schema. 
5   // Generated on: 2012.10.03 at 04:27:47 AM CEST 
6   //
7   
8   
9   package org.jdtaus.mojo.resource.model;
10  
11  
12  /**
13   * Java content class for Multiplicity.
14   *  <p>The following schema fragment specifies the expected content contained within this java content object.
15   * <p>
16   * <pre>
17   * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}NCName">
18   *   &lt;enumeration value="one"/>
19   *   &lt;enumeration value="many"/>
20   * &lt;/restriction>
21   * </pre>
22   * 
23   */
24  public class Multiplicity {
25  
26      private final static java.util.Map valueMap = new java.util.HashMap();
27      public final static java.lang.String _ONE = com.sun.xml.bind.WhiteSpaceProcessor.collapse(com.sun.xml.bind.DatatypeConverterImpl.installHook("one"));
28      public final static org.jdtaus.mojo.resource.model.Multiplicity ONE = new org.jdtaus.mojo.resource.model.Multiplicity(_ONE);
29      public final static java.lang.String _MANY = com.sun.xml.bind.WhiteSpaceProcessor.collapse(com.sun.xml.bind.DatatypeConverterImpl.installHook("many"));
30      public final static org.jdtaus.mojo.resource.model.Multiplicity MANY = new org.jdtaus.mojo.resource.model.Multiplicity(_MANY);
31      private final java.lang.String lexicalValue;
32      private final java.lang.String value;
33  
34      protected Multiplicity(java.lang.String v) {
35          value = v;
36          lexicalValue = v;
37          valueMap.put(v, this);
38      }
39  
40      public java.lang.String toString() {
41          return lexicalValue;
42      }
43  
44      public java.lang.String getValue() {
45          return value;
46      }
47  
48      public final int hashCode() {
49          return super.hashCode();
50      }
51  
52      public final boolean equals(java.lang.Object o) {
53          return super.equals(o);
54      }
55  
56      public static org.jdtaus.mojo.resource.model.Multiplicity fromValue(java.lang.String value) {
57          org.jdtaus.mojo.resource.model.Multiplicity t = ((org.jdtaus.mojo.resource.model.Multiplicity) valueMap.get(value));
58          if (t == null) {
59              throw new java.lang.IllegalArgumentException();
60          } else {
61              return t;
62          }
63      }
64  
65      public static org.jdtaus.mojo.resource.model.Multiplicity fromString(java.lang.String str) {
66          return fromValue(com.sun.xml.bind.WhiteSpaceProcessor.collapse(str));
67      }
68  
69  }