Package com.saicone.types.parser
Class UrlParser
java.lang.Object
com.saicone.types.parser.UrlParser
- All Implemented Interfaces:
TypeParser<URL>
,Function<Object,
URL>
Represents a parser that try to convert any object type to URL.
This parser is compatible with File, Path, URI and String object types.
This parser is compatible with File, Path, URI and String object types.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.saicone.types.TypeParser
andThen, andThen, apply, array, array, collection, collection, completableFuture, isInstance, list, list, list, optional, optional, parse, parse, parseOrDefault, parseOrDefault, set, set, set, supplyAsync, supplyAsync
-
Field Details
-
INSTANCE
UrlParser
public instance.
-
-
Constructor Details
-
UrlParser
public UrlParser()
-
-
Method Details
-
getType
Description copied from interface:TypeParser
Get the associated type object with this parser.- Specified by:
getType
in interfaceTypeParser<URL>
- Returns:
- a type object if present, null otherwise.
-
parse
Description copied from interface:TypeParser
Parse the given object into required type.- Specified by:
parse
in interfaceTypeParser<URL>
- Parameters:
object
- the object to parse.- Returns:
- a converted value type, null otherwise.
-