Class Evidence
- java.lang.Object
-
- org.owasp.dependencycheck.dependency.Evidence
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Evidence>
@ThreadSafe public class Evidence extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<Evidence>
Evidence is a piece of information about a Dependency.- Author:
- Jeremy Long
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Evidence()Creates a new Evidence object.Evidence(java.lang.String source, java.lang.String name, java.lang.String value, Confidence confidence)Creates a new Evidence objects.Evidence(java.lang.String source, java.lang.String name, java.lang.String value, Confidence confidence, boolean fromHint)Creates a new Evidence objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(@NotNull Evidence o)Implementation of the comparable interface.booleanequals(java.lang.Object obj)Implements equals for Evidence.ConfidencegetConfidence()Get the value of confidence.java.lang.StringgetName()Get the value of name.java.lang.StringgetSource()Get the value of source.java.lang.StringgetValue()Get the value of value.inthashCode()Implements the hashCode for Evidence.booleanisFromHint()Get the value of fromHint.voidsetConfidence(Confidence confidence)Set the value of confidence.voidsetFromHint(boolean fromHint)Set the value of fromHint.voidsetName(java.lang.String name)Set the value of name.voidsetSource(java.lang.String source)Set the value of source.voidsetValue(java.lang.String value)Set the value of value.java.lang.StringtoString()Standard toString() implementation.
-
-
-
Constructor Detail
-
Evidence
public Evidence()
Creates a new Evidence object.
-
Evidence
public Evidence(java.lang.String source, java.lang.String name, java.lang.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(java.lang.String source, java.lang.String name, java.lang.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 Detail
-
getName
public java.lang.String getName()
Get the value of name.- Returns:
- the value of name
-
setName
public void setName(java.lang.String name)
Set the value of name.- Parameters:
name- new value of name
-
getSource
public java.lang.String getSource()
Get the value of source.- Returns:
- the value of source
-
setSource
public void setSource(java.lang.String source)
Set the value of source.- Parameters:
source- new value of source
-
getValue
public java.lang.String getValue()
Get the value of value.- Returns:
- the value of value
-
setValue
public void setValue(java.lang.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:
hashCodein classjava.lang.Object- Returns:
- hash code.
-
equals
public boolean equals(java.lang.Object obj)
Implements equals for Evidence.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- an object to check the equality of.- Returns:
- whether the two objects are equal.
-
compareTo
public int compareTo(@NotNull @NotNull Evidence o)Implementation of the comparable interface.- Specified by:
compareToin interfacejava.lang.Comparable<Evidence>- Parameters:
o- the evidence being compared- Returns:
- an integer indicating the ordering of the two objects
-
toString
public java.lang.String toString()
Standard toString() implementation.- Overrides:
toStringin classjava.lang.Object- Returns:
- the string representation of the object
-
-