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, waitMethods 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
UrlParserpublic instance.
-
-
Constructor Details
-
UrlParser
public UrlParser()
-
-
Method Details
-
getType
Description copied from interface:TypeParserGet the associated type object with this parser.- Specified by:
getTypein interfaceTypeParser<URL>- Returns:
- a type object if present, null otherwise.
-
parse
Description copied from interface:TypeParserParse the given object into required type.- Specified by:
parsein interfaceTypeParser<URL>- Parameters:
object- the object to parse.- Returns:
- a converted value type, null otherwise.
-