Interface SearchableDocumentation


  • public interface SearchableDocumentation

    Specification for a Map of SortableLocations correlated to their respective JavaDocData. To simplify searching and accessing within the JavaDocData, the paths of each SortableLocation is exposed for searching and listing.

    Since:
    2.0
    Author:
    Lennart Jörelid, jGuru Europe AB
    • Method Detail

      • getPaths

        SortedSet<String> getPaths()
        Retrieves all unique SortableLocation paths within this SearchableDocumentation.
        Returns:
        all unique SortableLocation paths within this SearchableDocumentation. The result may be empty, but will never be null.
      • getJavaDoc

        JavaDocData getJavaDoc​(String path)
        Convenience method to acquire the JavaDocData for a SortableLocation with the supplied path.
        Parameters:
        path - A non-null path for which the harvested JavaDocData should be retrieved.
        Returns:
        The JavaDocData matching the SortableLocation with the supplied path, or null if no SortableLocation with the supplied path was found within this SearchableDocumentation.
      • getLocation

        <T extends SortableLocation> T getLocation​(String path)
        Convenience method to acquire the SortableLocation corresponding to the given path.
        Type Parameters:
        T - The SortableLocation subtype.
        Parameters:
        path - The path of a SortableLocation, which is retrieved by a call to its toString() method.
        Returns:
        the SortableLocation corresponding to the given path, or null if this SearchableDocumentation does not contain a SortableLocation with the provided path.
      • getAll

        SortedMap<SortableLocation,​JavaDocData> getAll()
        The full map relating each SortableLocation subclass to its corresponding JavaDocData.
        Returns:
        The full map relating each SortableLocation subclass to its corresponding JavaDocData. Never null.
      • getAll

        <T extends SortableLocationSortedMap<T,​JavaDocData> getAll​(Class<T> type)
        Convenience method which retrieves a SortedMap relating all SortableLocations of a particular type to their JavaDocData, respectively.
        Type Parameters:
        T - The SortableLocation subtype for which all JavaDocData should be retrieved.
        Parameters:
        type - The exact type of SortableLocation which should be filtered from the result and returned in the form of a SortedMap, along with its respective JavaDocData.
        Returns:
        a SortedMap relating all SortableLocations of a particular (exact) type (i.e. any subclass types will not be returned) to their JavaDocData, respectively. May return empty Maps, but never null.