| Class | Line # | Actions | |||
|---|---|---|---|---|---|
| NoValueColour | 35 | 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: 2025.04.17 at 04:05:44 PM BST | |
| 6 | // | |
| 7 | ||
| 8 | ||
| 9 | package jalview.xml.binding.jalview; | |
| 10 | ||
| 11 | import javax.xml.bind.annotation.XmlEnum; | |
| 12 | import javax.xml.bind.annotation.XmlEnumValue; | |
| 13 | import javax.xml.bind.annotation.XmlType; | |
| 14 | ||
| 15 | ||
| 16 | /** | |
| 17 | * Graduated feature colour if no score (or attribute) value | |
| 18 | * | |
| 19 | * <p>Java class for NoValueColour</p>. | |
| 20 | * | |
| 21 | * <p>The following schema fragment specifies the expected content contained within this class.</p> | |
| 22 | * <pre> | |
| 23 | * <simpleType name="NoValueColour"> | |
| 24 | * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> | |
| 25 | * <enumeration value="None"/> | |
| 26 | * <enumeration value="Min"/> | |
| 27 | * <enumeration value="Max"/> | |
| 28 | * </restriction> | |
| 29 | * </simpleType> | |
| 30 | * </pre> | |
| 31 | * | |
| 32 | */ | |
| 33 | @XmlType(name = "NoValueColour", namespace = "www.jalview.org/colours") | |
| 34 | @XmlEnum | |
| 35 | public enum NoValueColour { | |
| 36 | ||
| 37 | @XmlEnumValue("None") | |
| 38 | NONE("None"), | |
| 39 | @XmlEnumValue("Min") | |
| 40 | MIN("Min"), | |
| 41 | @XmlEnumValue("Max") | |
| 42 | MAX("Max"); | |
| 43 | private final String value; | |
| 44 | ||
| 45 | 9 | NoValueColour(String v) { |
| 46 | 9 | value = v; |
| 47 | } | |
| 48 | ||
| 49 | /** | |
| 50 | * Gets the value associated to the enum constant. | |
| 51 | * | |
| 52 | * @return | |
| 53 | * The value linked to the enum. | |
| 54 | */ | |
| 55 | 0 | public String value() { |
| 56 | 0 | return value; |
| 57 | } | |
| 58 | ||
| 59 | /** | |
| 60 | * Gets the enum associated to the value passed as parameter. | |
| 61 | * | |
| 62 | * @param v | |
| 63 | * The value to get the enum from. | |
| 64 | * @return | |
| 65 | * The enum which corresponds to the value, if it exists. | |
| 66 | * @throws IllegalArgumentException | |
| 67 | * If no value matches in the enum declaration. | |
| 68 | */ | |
| 69 | 0 | public static NoValueColour fromValue(String v) { |
| 70 | 0 | for (NoValueColour c: NoValueColour.values()) { |
| 71 | 0 | if (c.value.equals(v)) { |
| 72 | 0 | return c; |
| 73 | } | |
| 74 | } | |
| 75 | 0 | throw new IllegalArgumentException(v); |
| 76 | } | |
| 77 | ||
| 78 | } |