Clover icon

Coverage Report

  1. Project Clover database Thu Nov 7 2024 10:11:34 GMT
  2. Package jalview.xml.binding.jalview

File NoValueColour.java

 

Coverage histogram

../../../../img/srcFileCovDistChart2.png
54% of files have more coverage

Code metrics

2
6
3
1
86
33
4
0.67
2
3
1.33

Classes

Class Line # Actions
NoValueColour 40 6 4
0.1818181918.2%
 

Contributing tests

This file is covered by 1 test. .

Source view

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    * &lt;simpleType name="NoValueColour"&gt;
29    * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;
30    * &lt;enumeration value="None"/&gt;
31    * &lt;enumeration value="Min"/&gt;
32    * &lt;enumeration value="Max"/&gt;
33    * &lt;/restriction&gt;
34    * &lt;/simpleType&gt;
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 toggle 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 toggle 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 toggle 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    }