Coverage Report - org.tap4j.model.Header
 
Classes in this File Line Coverage Branch Coverage Complexity
Header
100%
7/7
N/A
1
 
 1  
 /*
 2  
  * The MIT License
 3  
  *
 4  
  * Copyright (c) <2010> <tap4j>
 5  
  * 
 6  
  * Permission is hereby granted, free of charge, to any person obtaining a copy
 7  
  * of this software and associated documentation files (the "Software"), to deal
 8  
  * in the Software without restriction, including without limitation the rights
 9  
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 10  
  * copies of the Software, and to permit persons to whom the Software is
 11  
  * furnished to do so, subject to the following conditions:
 12  
  * 
 13  
  * The above copyright notice and this permission notice shall be included in
 14  
  * all copies or substantial portions of the Software.
 15  
  * 
 16  
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 17  
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 18  
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 19  
  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 20  
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 21  
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 22  
  * THE SOFTWARE.
 23  
  */
 24  
 package org.tap4j.model;
 25  
 
 26  
 /**
 27  
  * TAP Header. Each TAP File has at most one header in the beginning of it. The
 28  
  * only thing that can precede the Header are comments. However a Header is not
 29  
  * required in a TAP File (i.e. the Header is optional).
 30  
  * 
 31  
  * @since 1.0
 32  
  */
 33  
 public class Header extends AbstractTapElementDiagnostic {
 34  
 
 35  
     /*
 36  
      * Serial Version UID.
 37  
      */
 38  
     private static final long serialVersionUID = -3823455733333632836L;
 39  
 
 40  
     /**
 41  
      * TAP file version.
 42  
      */
 43  
     private Integer version;
 44  
 
 45  
     /**
 46  
      * Header optional comment.
 47  
      */
 48  
     private Comment comment;
 49  
 
 50  
     /**
 51  
      * Constructor with parameter.
 52  
      * 
 53  
      * @param version TAP file version.
 54  
      */
 55  
     public Header(Integer version) {
 56  26
         super();
 57  26
         this.version = version;
 58  26
     }
 59  
 
 60  
     /**
 61  
      * @return The TAP file version.
 62  
      */
 63  
     public Integer getVersion() {
 64  8
         return this.version;
 65  
     }
 66  
 
 67  
     /**
 68  
      * @return Header comment.
 69  
      */
 70  
     public Comment getComment() {
 71  6
         return this.comment;
 72  
     }
 73  
 
 74  
     /**
 75  
      * Sets a comment into the Header.
 76  
      * 
 77  
      * @param comment Header comment.
 78  
      */
 79  
     public void setComment(Comment comment) {
 80  2
         this.comment = comment;
 81  2
     }
 82  
 
 83  
 }