Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
JavadocPathArtifact |
|
| 2.4444444444444446;2.444 |
1 | /* | |
2 | =================== DO NOT EDIT THIS FILE ==================== | |
3 | Generated by Modello 1.4.1 on 2012-01-17 14:35:53, | |
4 | any modifications will be overwritten. | |
5 | ============================================================== | |
6 | */ | |
7 | ||
8 | package org.apache.maven.plugin.javadoc.options; | |
9 | ||
10 | /** | |
11 | * An artifact object used by Javadoc path options like -docletpath | |
12 | * or -tagletpath. | |
13 | * | |
14 | * @version $Revision$ $Date$ | |
15 | */ | |
16 | @SuppressWarnings( "all" ) | |
17 | 8 | public class JavadocPathArtifact |
18 | implements java.io.Serializable | |
19 | { | |
20 | ||
21 | //--------------------------/ | |
22 | //- Class/Member Variables -/ | |
23 | //--------------------------/ | |
24 | ||
25 | /** | |
26 | * The id of the group of the artifact. | |
27 | */ | |
28 | private String groupId; | |
29 | ||
30 | /** | |
31 | * The id of the artifact. | |
32 | */ | |
33 | private String artifactId; | |
34 | ||
35 | /** | |
36 | * The version of the artifact. | |
37 | */ | |
38 | private String version; | |
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 | 0 | if ( this == other ) |
54 | { | |
55 | 0 | return true; |
56 | } | |
57 | ||
58 | 0 | if ( !( other instanceof JavadocPathArtifact ) ) |
59 | { | |
60 | 0 | return false; |
61 | } | |
62 | ||
63 | 0 | JavadocPathArtifact that = (JavadocPathArtifact) other; |
64 | 0 | boolean result = true; |
65 | ||
66 | 0 | result = result && ( getGroupId() == null ? that.getGroupId() == null : getGroupId().equals( that.getGroupId() ) ); |
67 | 0 | result = result && ( getArtifactId() == null ? that.getArtifactId() == null : getArtifactId().equals( that.getArtifactId() ) ); |
68 | 0 | result = result && ( getVersion() == null ? that.getVersion() == null : getVersion().equals( that.getVersion() ) ); |
69 | ||
70 | 0 | return result; |
71 | } //-- boolean equals( Object ) | |
72 | ||
73 | /** | |
74 | * Get the id of the artifact. | |
75 | * | |
76 | * @return String | |
77 | */ | |
78 | public String getArtifactId() | |
79 | { | |
80 | 27 | return this.artifactId; |
81 | } //-- String getArtifactId() | |
82 | ||
83 | /** | |
84 | * Get the id of the group of the artifact. | |
85 | * | |
86 | * @return String | |
87 | */ | |
88 | public String getGroupId() | |
89 | { | |
90 | 36 | return this.groupId; |
91 | } //-- String getGroupId() | |
92 | ||
93 | /** | |
94 | * Get the version of the artifact. | |
95 | * | |
96 | * @return String | |
97 | */ | |
98 | public String getVersion() | |
99 | { | |
100 | 27 | return this.version; |
101 | } //-- String getVersion() | |
102 | ||
103 | /** | |
104 | * Method hashCode. | |
105 | * | |
106 | * @return int | |
107 | */ | |
108 | public int hashCode() | |
109 | { | |
110 | 8 | int result = 17; |
111 | ||
112 | 8 | result = 37 * result + ( groupId != null ? groupId.hashCode() : 0 ); |
113 | 8 | result = 37 * result + ( artifactId != null ? artifactId.hashCode() : 0 ); |
114 | 8 | result = 37 * result + ( version != null ? version.hashCode() : 0 ); |
115 | ||
116 | 8 | return result; |
117 | } //-- int hashCode() | |
118 | ||
119 | /** | |
120 | * Set the id of the artifact. | |
121 | * | |
122 | * @param artifactId | |
123 | */ | |
124 | public void setArtifactId( String artifactId ) | |
125 | { | |
126 | 8 | this.artifactId = artifactId; |
127 | 8 | } //-- void setArtifactId( String ) |
128 | ||
129 | /** | |
130 | * Set the id of the group of the artifact. | |
131 | * | |
132 | * @param groupId | |
133 | */ | |
134 | public void setGroupId( String groupId ) | |
135 | { | |
136 | 8 | this.groupId = groupId; |
137 | 8 | } //-- void setGroupId( String ) |
138 | ||
139 | /** | |
140 | * Set the version of the artifact. | |
141 | * | |
142 | * @param version | |
143 | */ | |
144 | public void setVersion( String version ) | |
145 | { | |
146 | 8 | this.version = version; |
147 | 8 | } //-- void setVersion( String ) |
148 | ||
149 | /** | |
150 | * Method toString. | |
151 | * | |
152 | * @return String | |
153 | */ | |
154 | public java.lang.String toString() | |
155 | { | |
156 | 0 | StringBuilder buf = new StringBuilder( 128 ); |
157 | ||
158 | 0 | buf.append( "groupId = '" ); |
159 | 0 | buf.append( getGroupId() ); |
160 | 0 | buf.append( "'" ); |
161 | 0 | buf.append( "\n" ); |
162 | 0 | buf.append( "artifactId = '" ); |
163 | 0 | buf.append( getArtifactId() ); |
164 | 0 | buf.append( "'" ); |
165 | 0 | buf.append( "\n" ); |
166 | 0 | buf.append( "version = '" ); |
167 | 0 | buf.append( getVersion() ); |
168 | 0 | buf.append( "'" ); |
169 | ||
170 | 0 | return buf.toString(); |
171 | } //-- java.lang.String toString() | |
172 | ||
173 | } |