Package cdc.issues.locations
Class Locations
- java.lang.Object
-
- cdc.issues.locations.Locations
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Locationbuild(String location)Creates a Location instance from its standard string representation.static Locationbuild(String tag, String path, String anchor)Creates a Location instance.static BiFunction<String,String,? extends Location>getFactoryOrNull(String tag)Returns the factory associated to a tag.static Set<String>getTags()static voidregister(String tag, BiFunction<String,String,? extends Location> factory)
-
-
-
Method Detail
-
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
tagornull.
-
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 aDefaultLocation.- 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 inLocation.toString(Location).- Returns:
- A new Location instance.
- See Also:
Location.toString(Location)
-
-