Class Locations

java.lang.Object
cdc.issues.locations.Locations

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

    • register

      public static void register(String tag, BiFunction<String,String,? extends Location> factory)
    • 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.
    • build

      public static Location build(String location)
      Creates a Location instance from its standard string representation.
      Parameters:
      location - The standard string representation of the location, as defined in Location.toString(Location).
      Returns:
      A new Location instance.
      See Also: