Class 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
      int compareTo​(@NotNull Evidence o)
      Implementation of the comparable interface.
      boolean equals​(java.lang.Object obj)
      Implements equals for Evidence.
      Confidence getConfidence()
      Get the value of confidence.
      java.lang.String getName()
      Get the value of name.
      java.lang.String getSource()
      Get the value of source.
      java.lang.String getValue()
      Get the value of value.
      int hashCode()
      Implements the hashCode for Evidence.
      boolean isFromHint()
      Get the value of fromHint.
      void setConfidence​(Confidence confidence)
      Set the value of confidence.
      void setFromHint​(boolean fromHint)
      Set the value of fromHint.
      void setName​(java.lang.String name)
      Set the value of name.
      void setSource​(java.lang.String source)
      Set the value of source.
      void setValue​(java.lang.String value)
      Set the value of value.
      java.lang.String toString()
      Standard toString() implementation.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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:
        hashCode in class java.lang.Object
        Returns:
        hash code.
      • equals

        public boolean equals​(java.lang.Object obj)
        Implements equals for Evidence.
        Overrides:
        equals in class java.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:
        compareTo in interface java.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:
        toString in class java.lang.Object
        Returns:
        the string representation of the object