Class PackageLocation

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String packageName  
    • Constructor Summary

      Constructors 
      Constructor Description
      PackageLocation​(java.lang.String packageName)
      Creates a new PackageLocation with the supplied package name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(SortableLocation that)
      Compares the string representations of this PackageLocation and the supplied SortableLocation.
      boolean equals​(java.lang.Object obj)
      java.lang.String getAnnotationRenamedTo()
      Note: Packages cannot be renamed from a JAXB annotation.
      java.lang.String getPackageName()
      Retrieves the name of the package potentially holding JavaDoc.
      java.lang.String getPath()
      Retrieves the path of this SortableLocation.
      int hashCode()
      boolean isEqualToPath​(java.lang.String path)
      Validates if the supplied path is equal to this SortableLocation.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

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

      • packageName

        private java.lang.String packageName
    • Constructor Detail

      • PackageLocation

        public PackageLocation​(java.lang.String packageName)
        Creates a new PackageLocation with the supplied package name.
        Parameters:
        packageName - The name of the package potentially holding JavaDoc. Cannot be null.
    • Method Detail

      • getPackageName

        public java.lang.String getPackageName()
        Retrieves the name of the package potentially holding JavaDoc.
        Returns:
        The name of the package potentially holding JavaDoc. Can be empty, but never null.
      • 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
      • getAnnotationRenamedTo

        public java.lang.String getAnnotationRenamedTo()
        Note: Packages cannot be renamed from a JAXB annotation. Retrieves the value of the name attribute provided by a JAXB annotation, implying that the XSD type should use another name than the default.
        Specified by:
        getAnnotationRenamedTo in interface SortableLocation
        Returns:
        the value of the name attribute provided by a JAXB annotation relevant to this SortableLocation.
        See Also:
        XmlElement.name(), XmlAttribute.name(), XmlType.name()
      • getPath

        public java.lang.String getPath()
        Retrieves the path of this SortableLocation. The path must uniquely correspond to each unique SortableLocation, implying that SortableLocations could be sorted and compared for equality using the path property.
        Specified by:
        getPath in interface SortableLocation
        Returns:
        the path of this SortableLocation. Never null.
      • toString

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

        public boolean isEqualToPath​(java.lang.String path)
        Validates if the supplied path is equal to this SortableLocation.
        Specified by:
        isEqualToPath in interface SortableLocation
        Parameters:
        path - The non-null path to compare to this SortableLocation.
        Returns:
        true if this SortableLocation is equal to the supplied path.
      • compareTo

        public int compareTo​(SortableLocation that)

        Compares the string representations of this PackageLocation and the supplied SortableLocation.

        Specified by:
        compareTo in interface java.lang.Comparable<SortableLocation>