Class GenericIdentifier

java.lang.Object
org.owasp.dependencycheck.dependency.naming.GenericIdentifier
All Implemented Interfaces:
Serializable, Comparable<Identifier>, Identifier

@ThreadSafe public class GenericIdentifier extends Object implements Identifier
In identifier such as a CPE or dependency coordinates (i.e. GAV).
Author:
Jeremy Long
See Also:
  • Constructor Details

    • GenericIdentifier

      public GenericIdentifier(String value, Confidence confidence)
      Constructs a new Identifier with the specified data.
      Parameters:
      value - the identifier value
      confidence - the confidence level that the identifier is correct
    • GenericIdentifier

      public GenericIdentifier(String value, String url, Confidence confidence)
      Constructs a new Identifier with the specified data.
      Parameters:
      value - the identifier value
      url - the identifier URL
      confidence - the confidence level that the identifier is correct
  • Method Details

    • getConfidence

      public Confidence getConfidence()
      Get the value of confidence.
      Specified by:
      getConfidence in interface Identifier
      Returns:
      the value of confidence
    • getValue

      public String getValue()
      Get the string representation of the Identifier.
      Specified by:
      getValue in interface Identifier
      Returns:
      the value of notes
    • getUrl

      public String getUrl()
      Get the value of URL.
      Specified by:
      getUrl in interface Identifier
      Returns:
      the value of URL
    • getNotes

      public String getNotes()
      Get the value of notes from suppression notes.
      Specified by:
      getNotes in interface Identifier
      Returns:
      the value of notes
    • setConfidence

      public void setConfidence(Confidence confidence)
      Set the value of confidence.
      Specified by:
      setConfidence in interface Identifier
      Parameters:
      confidence - the value of confidence
    • setUrl

      public void setUrl(String url)
      Set the value of URL.
      Specified by:
      setUrl in interface Identifier
      Parameters:
      url - the value of URL
    • setNotes

      public void setNotes(String notes)
      Set the value of notes.
      Specified by:
      setNotes in interface Identifier
      Parameters:
      notes - new value of notes
    • equals

      public boolean equals(Object obj)
      Basic implementation of equals.
      Overrides:
      equals in class Object
      Parameters:
      obj - the identifier to compare
      Returns:
      true if the objects are equal
    • hashCode

      public int hashCode()
      Basic implementation of hasCode.
      Overrides:
      hashCode in class Object
      Returns:
      the hash code
    • toString

      public String toString()
      Standard implementation of toString; displays identifier value and type.
      Overrides:
      toString in class Object
      Returns:
      a String representation of the object
    • compareTo

      public int compareTo(@NonNull Identifier o)
      Implementation of the comparator interface.
      Specified by:
      compareTo in interface Comparable<Identifier>
      Parameters:
      o - the object being compared
      Returns:
      an integer indicating the ordering