This project has retired. For details please refer to its
Attic page.
License xref
1 package org.apache.archiva.metadata.model;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import javax.xml.bind.annotation.XmlRootElement;
23 import java.io.Serializable;
24
25
26
27
28 @XmlRootElement(name = "license")
29 public class License
30 implements Serializable, Comparable<License>
31 {
32
33
34
35 private String name;
36
37
38
39
40 private String url;
41
42 private Integer index = 0;
43
44 public License( String name, String url )
45 {
46 this.name = name;
47 this.url = url;
48 }
49
50 public License()
51 {
52
53 }
54
55 public String getName()
56 {
57 return name;
58 }
59
60 public void setName( String name )
61 {
62 this.name = name;
63 }
64
65 public String getUrl()
66 {
67 return url;
68 }
69
70 public void setUrl( String url )
71 {
72 this.url = url;
73 }
74
75 @Override
76 public boolean equals( Object o )
77 {
78 if ( this == o )
79 {
80 return true;
81 }
82 if ( o == null || getClass() != o.getClass() )
83 {
84 return false;
85 }
86
87 License/../../../../org/apache/archiva/metadata/model/License.html#License">License license = (License) o;
88
89 if ( name != null ? !name.equals( license.name ) : license.name != null )
90 {
91 return false;
92 }
93 if ( url != null ? !url.equals( license.url ) : license.url != null )
94 {
95 return false;
96 }
97
98 return true;
99 }
100
101 @Override
102 public int hashCode()
103 {
104 int result = name != null ? name.hashCode() : 0;
105 result = 31 * result + ( url != null ? url.hashCode() : 0 );
106 return result;
107 }
108
109 @Override
110 public String toString()
111 {
112 return "License{" + "name='" + name + '\'' + ", url='" + url + '\'' + '}';
113 }
114
115 public Integer getIndex() {
116 return index;
117 }
118
119 public void setIndex(int index) {
120 this.index = index;
121 }
122
123
124 @Override
125 public int compareTo(License o) {
126 return this.index.compareTo(o.getIndex());
127 }
128 }