Class | Line # | Actions | |||
---|---|---|---|---|---|
NoValueColour | 40 | 6 | 4 |
1 | // | |
2 | // This file was generated by the Eclipse Implementation of JAXB, v2.3.9 | |
3 | // See https://eclipse-ee4j.github.io/jaxb-ri | |
4 | // Any modifications to this file will be lost upon recompilation of the source schema. | |
5 | // Generated on: 2024.07.25 at 04:43:38 PM BST | |
6 | // | |
7 | ||
8 | package jalview.xml.binding.jalview; | |
9 | ||
10 | import javax.xml.bind.annotation.XmlEnum; | |
11 | import javax.xml.bind.annotation.XmlEnumValue; | |
12 | import javax.xml.bind.annotation.XmlType; | |
13 | ||
14 | /** | |
15 | * Graduated feature colour if no score (or attribute) value | |
16 | * | |
17 | * <p> | |
18 | * Java class for NoValueColour | |
19 | * </p> | |
20 | * . | |
21 | * | |
22 | * <p> | |
23 | * The following schema fragment specifies the expected content contained within | |
24 | * this class. | |
25 | * </p> | |
26 | * | |
27 | * <pre> | |
28 | * <simpleType name="NoValueColour"> | |
29 | * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> | |
30 | * <enumeration value="None"/> | |
31 | * <enumeration value="Min"/> | |
32 | * <enumeration value="Max"/> | |
33 | * </restriction> | |
34 | * </simpleType> | |
35 | * </pre> | |
36 | * | |
37 | */ | |
38 | @XmlType(name = "NoValueColour", namespace = "www.jalview.org/colours") | |
39 | @XmlEnum | |
40 | public enum NoValueColour | |
41 | { | |
42 | ||
43 | @XmlEnumValue("None") | |
44 | NONE("None"), @XmlEnumValue("Min") | |
45 | MIN("Min"), @XmlEnumValue("Max") | |
46 | MAX("Max"); | |
47 | ||
48 | private final String value; | |
49 | ||
50 | 9 | NoValueColour(String v) |
51 | { | |
52 | 9 | value = v; |
53 | } | |
54 | ||
55 | /** | |
56 | * Gets the value associated to the enum constant. | |
57 | * | |
58 | * @return The value linked to the enum. | |
59 | */ | |
60 | 0 | public String value() |
61 | { | |
62 | 0 | return value; |
63 | } | |
64 | ||
65 | /** | |
66 | * Gets the enum associated to the value passed as parameter. | |
67 | * | |
68 | * @param v | |
69 | * The value to get the enum from. | |
70 | * @return The enum which corresponds to the value, if it exists. | |
71 | * @throws IllegalArgumentException | |
72 | * If no value matches in the enum declaration. | |
73 | */ | |
74 | 0 | public static NoValueColour fromValue(String v) |
75 | { | |
76 | 0 | for (NoValueColour c : NoValueColour.values()) |
77 | { | |
78 | 0 | if (c.value.equals(v)) |
79 | { | |
80 | 0 | return c; |
81 | } | |
82 | } | |
83 | 0 | throw new IllegalArgumentException(v); |
84 | } | |
85 | ||
86 | } |