Class Reference

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Reference>

    @ThreadSafe
    public class Reference
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Comparable<Reference>
    An external reference for a vulnerability. This contains a name, URL, and a source.
    Author:
    Jeremy Long
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Reference()
      Creates a new reference.
      Reference​(java.lang.String name, java.lang.String source, java.lang.String url)
      Creates a new reference.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(@NotNull Reference o)
      Implementation of the comparable interface.
      boolean equals​(java.lang.Object obj)  
      java.lang.String getName()
      Get the value of name.
      java.lang.String getSource()
      Get the value of source.
      java.lang.String getUrl()
      Get the value of url.
      int hashCode()  
      void setName​(java.lang.String name)
      Set the value of name.
      void setSource​(java.lang.String source)
      Set the value of source.
      void setUrl​(java.lang.String url)
      Set the value of url.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Reference

        public Reference()
        Creates a new reference.
      • Reference

        public Reference​(java.lang.String name,
                         java.lang.String source,
                         java.lang.String url)
        Creates a new reference.
        Parameters:
        name - the reference name
        source - the reference source
        url - the reference url
    • 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
      • getUrl

        public java.lang.String getUrl()
        Get the value of url.
        Returns:
        the value of url
      • setUrl

        public void setUrl​(java.lang.String url)
        Set the value of url.
        Parameters:
        url - new value of url
      • 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
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        public int compareTo​(@NotNull
                             @NotNull Reference o)
        Implementation of the comparable interface.
        Specified by:
        compareTo in interface java.lang.Comparable<Reference>
        Parameters:
        o - the Reference being compared
        Returns:
        an integer indicating the ordering of the two objects