Coverage Report - org.apache.maven.plugin.javadoc.options.Group
 
Classes in this File Line Coverage Branch Coverage Complexity
Group
88 %
29/33
46 %
11/24
1,444
 
 1  
 /*
 2  
  * $Id$
 3  
  */
 4  
 
 5  
 package org.apache.maven.plugin.javadoc.options;
 6  
 
 7  
   //---------------------------------/
 8  
  //- Imported classes and packages -/
 9  
 //---------------------------------/
 10  
 
 11  
 import java.util.Date;
 12  
 
 13  
 /**
 14  
  * A Group parameter.
 15  
  * 
 16  
  * @version $Revision$ $Date$
 17  
  */
 18  7
 public class Group implements java.io.Serializable {
 19  
 
 20  
 
 21  
       //--------------------------/
 22  
      //- Class/Member Variables -/
 23  
     //--------------------------/
 24  
 
 25  
     /**
 26  
      * Title can be any text, and can include white space. This
 27  
      * text is placed in the table heading for the group.
 28  
      */
 29  
     private String title;
 30  
 
 31  
     /**
 32  
      * Packages can be any package name, or can be the start of any
 33  
      * package name followed by an asterisk (*). The asterisk is a
 34  
      * wildcard meaning "match any characters". This is the only
 35  
      * wildcard allowed. Multiple patterns can be included in a
 36  
      * group by separating them with colons (:).
 37  
      */
 38  
     private String packages;
 39  
 
 40  
 
 41  
       //-----------/
 42  
      //- Methods -/
 43  
     //-----------/
 44  
 
 45  
     /**
 46  
      * Method equals.
 47  
      * 
 48  
      * @param other
 49  
      * @return boolean
 50  
      */
 51  
     public boolean equals(Object other)
 52  
     {
 53  2
         if ( this == other)
 54  
         {
 55  0
             return true;
 56  
         }
 57  
         
 58  2
         if ( !(other instanceof Group) )
 59  
         {
 60  1
             return false;
 61  
         }
 62  
         
 63  1
         Group that = (Group) other;
 64  1
         boolean result = true;
 65  
         
 66  1
         result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) );
 67  1
         result = result && ( getPackages() == null ? that.getPackages() == null : getPackages().equals( that.getPackages() ) );
 68  
         
 69  1
         return result;
 70  
     } //-- boolean equals(Object) 
 71  
 
 72  
     /**
 73  
      * Get packages can be any package name, or can be the start of
 74  
      * any package name followed by an asterisk (*). The asterisk
 75  
      * is a wildcard meaning "match any characters". This is the
 76  
      * only wildcard allowed. Multiple patterns can be included in
 77  
      * a group by separating them with colons (:).
 78  
      * 
 79  
      * @return String
 80  
      */
 81  
     public String getPackages()
 82  
     {
 83  9
         return this.packages;
 84  
     } //-- String getPackages() 
 85  
 
 86  
     /**
 87  
      * Get title can be any text, and can include white space. This
 88  
      * text is placed in the table heading for the group.
 89  
      * 
 90  
      * @return String
 91  
      */
 92  
     public String getTitle()
 93  
     {
 94  9
         return this.title;
 95  
     } //-- String getTitle() 
 96  
 
 97  
     /**
 98  
      * Method hashCode.
 99  
      * 
 100  
      * @return int
 101  
      */
 102  
     public int hashCode()
 103  
     {
 104  1
         int result = 17;
 105  
         
 106  1
         result = 37 * result + ( title != null ? title.hashCode() : 0 );
 107  1
         result = 37 * result + ( packages != null ? packages.hashCode() : 0 );
 108  
         
 109  1
         return result;
 110  
     } //-- int hashCode() 
 111  
 
 112  
     /**
 113  
      * Set packages can be any package name, or can be the start of
 114  
      * any package name followed by an asterisk (*). The asterisk
 115  
      * is a wildcard meaning "match any characters". This is the
 116  
      * only wildcard allowed. Multiple patterns can be included in
 117  
      * a group by separating them with colons (:).
 118  
      * 
 119  
      * @param packages
 120  
      */
 121  
     public void setPackages(String packages)
 122  
     {
 123  7
         this.packages = packages;
 124  7
     } //-- void setPackages(String) 
 125  
 
 126  
     /**
 127  
      * Set title can be any text, and can include white space. This
 128  
      * text is placed in the table heading for the group.
 129  
      * 
 130  
      * @param title
 131  
      */
 132  
     public void setTitle(String title)
 133  
     {
 134  7
         this.title = title;
 135  7
     } //-- void setTitle(String) 
 136  
 
 137  
     /**
 138  
      * Method toString.
 139  
      * 
 140  
      * @return java.lang.String
 141  
      */
 142  
     public java.lang.String toString()
 143  
     {
 144  2
         StringBuffer buf = new StringBuffer();
 145  
         
 146  2
         buf.append( "title = '" );
 147  2
         buf.append( getTitle() );
 148  2
         buf.append( "'" );
 149  2
         buf.append( "\n" ); 
 150  2
         buf.append( "packages = '" );
 151  2
         buf.append( getPackages() );
 152  2
         buf.append( "'" );
 153  
         
 154  2
         return buf.toString();
 155  
     } //-- java.lang.String toString() 
 156  
 
 157  
 
 158  7
     private String modelEncoding = "UTF-8";
 159  
 
 160  
     /**
 161  
      * Set an encoding used for reading/writing the model.
 162  
      *
 163  
      * @param modelEncoding the encoding used when reading/writing the model.
 164  
      */
 165  
     public void setModelEncoding( String modelEncoding )
 166  
     {
 167  0
         this.modelEncoding = modelEncoding;
 168  0
     }
 169  
 
 170  
     /**
 171  
      * @return the current encoding used when reading/writing this model.
 172  
      */
 173  
     public String getModelEncoding()
 174  
     {
 175  0
         return modelEncoding;
 176  
     }
 177  
 }