Coverage Report - org.crosswire.common.xml.RedLetterText
 
Classes in this File Line Coverage Branch Coverage Complexity
RedLetterText
0%
0/9
0%
0/4
1.25
 
 1  
 /**
 2  
  * Distribution License:
 3  
  * JSword is free software; you can redistribute it and/or modify it under
 4  
  * the terms of the GNU Lesser General Public License, version 2.1 or later
 5  
  * as published by the Free Software Foundation. This program is distributed
 6  
  * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
 7  
  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 8  
  * See the GNU Lesser General Public License for more details.
 9  
  *
 10  
  * The License is available on the internet at:
 11  
  *      http://www.gnu.org/copyleft/lgpl.html
 12  
  * or by writing to:
 13  
  *      Free Software Foundation, Inc.
 14  
  *      59 Temple Place - Suite 330
 15  
  *      Boston, MA 02111-1307, USA
 16  
  *
 17  
  * © CrossWire Bible Society, 2005 - 2016
 18  
  *
 19  
  */
 20  
 package org.crosswire.common.xml;
 21  
 
 22  
 /**
 23  
  * RedLetterText remembers when text should be red. Red Letter Text is used to
 24  
  * highlight the words of Jesus.
 25  
  * 
 26  
  * @see gnu.lgpl.License The GNU Lesser General Public License for details.
 27  
  * @author DM Smith
 28  
  * 
 29  
  */
 30  
 public class RedLetterText {
 31  
     private int rlt;
 32  
 
 33  
     /**
 34  
      * Construct a RedLetterText.
 35  
      */
 36  0
     public RedLetterText() {
 37  0
         rlt = 0;
 38  0
     }
 39  
 
 40  
     /**
 41  
      * Call when Red Letter Text is entered
 42  
      * 
 43  
      */
 44  
     public void enter() {
 45  0
         rlt++;
 46  0
     }
 47  
 
 48  
     /**
 49  
      * Call when Red Letter Text is left
 50  
      * 
 51  
      */
 52  
     public void leave() {
 53  0
         if (rlt > 0) {
 54  0
             rlt--;
 55  
         }
 56  0
     }
 57  
 
 58  
     /**
 59  
      * Returns true when one is in Red Letter Text
 60  
      * 
 61  
      * @return true if in RLT, false otherwise
 62  
      */
 63  
     public boolean isRLT() {
 64  0
         return rlt > 0;
 65  
     }
 66  
 }