mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-18 07:14:09 +01:00
implemented the Comparable interface
Former-commit-id: 9e69353436d60bf42c851c8d7a9e8e3de5407571
This commit is contained in:
@@ -30,7 +30,7 @@ import org.owasp.dependencycheck.data.cpe.Entry;
|
|||||||
*
|
*
|
||||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
* @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.
|
* 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);
|
hash = 83 * hash + (this.getName() != null ? this.getName().hashCode() : 0);
|
||||||
return hash;
|
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