Class Locations


  • public final class Locations
    extends Object
    Factory of Location.
    Author:
    Damien Carbonne
    • Method Detail

      • getTags

        public static Set<String> getTags()
        Returns:
        The set of tags for which a factory has been registered.
      • getFactoryOrNull

        public static BiFunction<String,​String,​? extends Location> getFactoryOrNull​(String tag)
        Returns the factory associated to a tag.
        Parameters:
        tag - The tag.
        Returns:
        The factory associated to tag or null.
      • build

        public static Location build​(String tag,
                                     String path,
                                     String anchor)
        Creates a Location instance.

        If a factory is registered for tag, uses it. Otherwise, creates a DefaultLocation.

        Parameters:
        tag - The tag.
        path - The path.
        anchor - The anchor.
        Returns:
        A new Location instance.