mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 15:53:36 +01:00
implemented the Comparable interface
Former-commit-id: 2be5ef6e2d0d9570186273fb6b8fc42e372ff251
This commit is contained in:
@@ -30,7 +30,7 @@ import org.owasp.dependencycheck.data.cpe.Entry;
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public class VulnerableSoftware extends Entry implements Serializable {
|
||||
public class VulnerableSoftware extends Entry implements Serializable, Comparable {
|
||||
|
||||
/**
|
||||
* The serial version UID.
|
||||
@@ -104,4 +104,13 @@ public class VulnerableSoftware extends Entry implements Serializable {
|
||||
hash = 83 * hash + (this.getName() != null ? this.getName().hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of the comparable interface.
|
||||
* @param vs the VulnerableSoftware to compare
|
||||
* @return an integer indicating the ordering of the two objects
|
||||
*/
|
||||
public int compareTo(VulnerableSoftware vs) {
|
||||
return this.getName().compareTo(vs.getName());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user