Coverage Report - org.apache.maven.plugins.changes.model.Body
 
Classes in this File Line Coverage Branch Coverage Complexity
Body
28%
5/18
20%
2/10
1.833
 
 1  
 /*
 2  
  * $Id$
 3  
  */
 4  
 
 5  
 package org.apache.maven.plugins.changes.model;
 6  
 
 7  
   //---------------------------------/
 8  
  //- Imported classes and packages -/
 9  
 //---------------------------------/
 10  
 
 11  
 import java.util.Date;
 12  
 
 13  
 /**
 14  
  * Class Body.
 15  
  * 
 16  
  * @version $Revision$ $Date$
 17  
  */
 18  2
 public class Body implements java.io.Serializable {
 19  
 
 20  
 
 21  
       //--------------------------/
 22  
      //- Class/Member Variables -/
 23  
     //--------------------------/
 24  
 
 25  
     /**
 26  
      * Field releases.
 27  
      */
 28  
     private java.util.List releases;
 29  
 
 30  
 
 31  
       //-----------/
 32  
      //- Methods -/
 33  
     //-----------/
 34  
 
 35  
     /**
 36  
      * Method addRelease.
 37  
      * 
 38  
      * @param release
 39  
      */
 40  
     public void addRelease(Release release)
 41  
     {
 42  0
         if ( !(release instanceof Release) )
 43  
         {
 44  0
             throw new ClassCastException( "Body.addReleases(release) parameter must be instanceof " + Release.class.getName() );
 45  
         }
 46  0
         getReleases().add( release );
 47  0
     } //-- void addRelease(Release) 
 48  
 
 49  
     /**
 50  
      * Method getReleases.
 51  
      * 
 52  
      * @return java.util.List
 53  
      */
 54  
     public java.util.List getReleases()
 55  
     {
 56  6
         if ( this.releases == null )
 57  
         {
 58  2
             this.releases = new java.util.ArrayList();
 59  
         }
 60  
         
 61  6
         return this.releases;
 62  
     } //-- java.util.List getReleases() 
 63  
 
 64  
     /**
 65  
      * Method removeRelease.
 66  
      * 
 67  
      * @param release
 68  
      */
 69  
     public void removeRelease(Release release)
 70  
     {
 71  0
         if ( !(release instanceof Release) )
 72  
         {
 73  0
             throw new ClassCastException( "Body.removeReleases(release) parameter must be instanceof " + Release.class.getName() );
 74  
         }
 75  0
         getReleases().remove( release );
 76  0
     } //-- void removeRelease(Release) 
 77  
 
 78  
     /**
 79  
      * Set the list of releases for this project.
 80  
      * 
 81  
      * @param releases
 82  
      */
 83  
     public void setReleases(java.util.List releases)
 84  
     {
 85  0
         this.releases = releases;
 86  0
     } //-- void setReleases(java.util.List) 
 87  
 
 88  
 
 89  2
     private String modelEncoding = "UTF-8";
 90  
 
 91  
     /**
 92  
      * Set an encoding used for reading/writing the model.
 93  
      *
 94  
      * @param modelEncoding the encoding used when reading/writing the model.
 95  
      */
 96  
     public void setModelEncoding( String modelEncoding )
 97  
     {
 98  0
         this.modelEncoding = modelEncoding;
 99  0
     }
 100  
 
 101  
     /**
 102  
      * @return the current encoding used when reading/writing this model.
 103  
      */
 104  
     public String getModelEncoding()
 105  
     {
 106  0
         return modelEncoding;
 107  
     }
 108  
 }