T - The return type for the function.E - The kind of thrown exception or error.@FunctionalInterface public interface Converter<T,E extends Exception>
Function<String,T> but can throw an Exception.| Modifier and Type | Field | Description |
|---|---|---|
static Converter<Class<?>,ClassNotFoundException> |
CLASS |
Class name converter.
|
static Converter<Date,ParseException> |
DATE |
Converts to a date using the format string Form "EEE MMM dd HH:mm:ss zzz yyyy".
|
static Converter<?,RuntimeException> |
DEFAULT |
The default converter.
|
static Converter<File,NullPointerException> |
FILE |
File name converter.
|
static Converter<Number,NumberFormatException> |
NUMBER |
Number converter.
|
static Converter<Object,ReflectiveOperationException> |
OBJECT |
Converts a class name to an instance of the class.
|
static Converter<Path,InvalidPathException> |
PATH |
Path converter.
|
static Converter<URL,MalformedURLException> |
URL |
Creates a URL.
|
| Modifier and Type | Method | Description |
|---|---|---|
T |
apply(String string) |
Applies the conversion function to the String argument.
|
static final Converter<?,RuntimeException> DEFAULT
static final Converter<Class<?>,ClassNotFoundException> CLASS
Class.forName(String).static final Converter<File,NullPointerException> FILE
File.File(String).static final Converter<Path,InvalidPathException> PATH
Paths.get(java.net.URI).static final Converter<Number,NumberFormatException> NUMBER
static final Converter<Object,ReflectiveOperationException> OBJECT
CLASSstatic final Converter<URL,MalformedURLException> URL
URL.URL(String).static final Converter<Date,ParseException> DATE
Copyright © 2002-2025 The Apache Software Foundation. All rights reserved.Apache Commons CLI | Issue management | Source repository