1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.rendering.wikimodel.impl

File InlineState.java

 

Coverage histogram

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

Code metrics

0
5
4
1
78
36
4
0.8
1.25
4
1

Classes

Class Line # Actions
InlineState 26 5 0% 4 2
0.777777877.8%
 

Contributing tests

This file is covered by 1473 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.wikimodel.impl;
21   
22    /**
23    * @version $Id: 705c05a91dbea173df284dfc9cdff28780b83eb3 $
24    * @since 4.0M1
25    */
 
26    public class InlineState
27    {
28    public final static int BEGIN = inc();
29   
30    public final static int BEGIN_FORMAT = inc();
31   
32    public final static int ESCAPE = inc();
33   
34    public final static int EXTENSION = inc();
35   
36    private static int fCounter;
37   
38    public final static int IMAGE = inc();
39   
40    public final static int LINE_BREAK = inc();
41   
42    public final static int MACRO = inc();
43   
44    public final static int NEW_LINE = inc();
45   
46    public final static int REFERENCE = inc();
47   
48    public final static int SPACE = inc();
49   
50    public final static int SPECIAL_SYMBOL = inc();
51   
52    public final static int VERBATIM = inc();
53   
54    public final static int WORD = inc();
55   
 
56  1131 toggle private static int inc()
57    {
58  1131 fCounter++;
59  1131 return 1 << fCounter;
60    }
61   
62    private int fState = BEGIN_FORMAT;
63   
 
64  31 toggle public boolean check(int mask)
65    {
66  31 return (fState & mask) == mask;
67    }
68   
 
69  0 toggle public int get()
70    {
71  0 return fState;
72    }
73   
 
74  1194477 toggle public void set(int state)
75    {
76  1194473 fState = state;
77    }
78    }