1. Project Clover database Sat Feb 2 2019 06:45:20 CET
  2. Package org.xwiki.rendering.listener

File HeaderLevel.java

 

Coverage histogram

../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
25
3
1
106
46
9
0.36
8.33
3
3

Classes

Class Line # Actions
HeaderLevel 26 25 0% 9 2
0.928571492.9%
 

Contributing tests

This file is covered by 677 tests. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.rendering.listener;
21   
22    /**
23    * @version $Id: 300cdcbd02ce26ea7f648d7aec2b224a92334745 $
24    * @since 1.5M2
25    */
 
26    public enum HeaderLevel
27    {
28    /**
29    * Header of level 1.
30    */
31    LEVEL1,
32   
33    /**
34    * Header of level 2.
35    */
36    LEVEL2,
37   
38    /**
39    * Header of level 3.
40    */
41    LEVEL3,
42   
43    /**
44    * Header of level 4.
45    */
46    LEVEL4,
47   
48    /**
49    * Header of level 5.
50    */
51    LEVEL5,
52   
53    /**
54    * Header of level 6.
55    */
56    LEVEL6;
57   
58    /**
59    * @return the header level as integer
60    */
 
61  45319 toggle public int getAsInt()
62    {
63  45324 return this.ordinal() + 1;
64    }
65   
 
66  1446 toggle @Override
67    public String toString()
68    {
69  1446 return String.valueOf(getAsInt());
70    }
71   
72    /**
73    * Convert provided integer into the corresponding header level enum entry.
74    *
75    * @param value the header level as integer
76    * @return the header level as enum entry
77    */
 
78  14934 toggle