Class Evidence

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

@ThreadSafe public class Evidence extends Object implements Serializable, Comparable<Evidence>
Evidence is a piece of information about a Dependency.
Author:
Jeremy Long
See Also:
  • Constructor Details

    • Evidence

      public Evidence()
      Creates a new Evidence object.
    • Evidence

      public Evidence(String source, String name, String value, Confidence confidence)
      Creates a new Evidence objects.
      Parameters:
      source - the source of the evidence.
      name - the name of the evidence.
      value - the value of the evidence.
      confidence - the confidence of the evidence.
    • Evidence

      public Evidence(String source, String name, String value, Confidence confidence, boolean fromHint)
      Creates a new Evidence objects.
      Parameters:
      source - the source of the evidence.
      name - the name of the evidence.
      value - the value of the evidence.
      confidence - the confidence of the evidence.
      fromHint - whether the evidence was introduced by a hint.
  • Method Details

    • getName

      public String getName()
      Get the value of name.
      Returns:
      the value of name
    • setName

      public void setName(String name)
      Set the value of name.
      Parameters:
      name - new value of name
    • getSource

      public String getSource()
      Get the value of source.
      Returns:
      the value of source
    • setSource

      public void setSource(String source)
      Set the value of source.
      Parameters:
      source - new value of source
    • getValue

      public String getValue()
      Get the value of value.
      Returns:
      the value of value
    • setValue

      public void setValue(String value)
      Set the value of value.
      Parameters:
      value - new value of value
    • getConfidence

      public Confidence getConfidence()
      Get the value of confidence.
      Returns:
      the value of confidence
    • setConfidence

      public void setConfidence(Confidence confidence)
      Set the value of confidence.
      Parameters:
      confidence - new value of confidence
    • isFromHint

      public boolean isFromHint()
      Get the value of fromHint.
      Returns:
      the value of fromHint
    • setFromHint

      public void setFromHint(boolean fromHint)
      Set the value of fromHint.
      Parameters:
      fromHint - new value of fromHint
    • hashCode

      public int hashCode()
      Implements the hashCode for Evidence.
      Overrides:
      hashCode in class Object
      Returns:
      hash code.
    • equals

      public boolean equals(Object obj)
      Implements equals for Evidence.
      Overrides:
      equals in class Object
      Parameters:
      obj - an object to check the equality of.
      Returns:
      whether the two objects are equal.
    • compareTo

      public int compareTo(@NonNull Evidence o)
      Implementation of the comparable interface.
      Specified by:
      compareTo in interface Comparable<Evidence>
      Parameters:
      o - the evidence being compared
      Returns:
      an integer indicating the ordering of the two objects
    • toString

      public String toString()
      Standard toString() implementation.
      Overrides:
      toString in class Object
      Returns:
      the string representation of the object