All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.carrotsearch.console.jcommander.IStringConverter Maven / Gradle / Ivy

There is a newer version: 1.1.4
Show newest version
/*
 * console-tools
 *
 * Copyright (C) 2019, Carrot Search s.c.
 * All rights reserved.
 */
package com.carrotsearch.console.jcommander;

/**
 * An interface that converts strings to any arbitrary type.
 *
 * 

If your class implements a constructor that takes a String, this constructor will be used to * instantiate your converter and the parameter will receive the name of the option that's being * parsed, which can be useful to issue a more useful error message if the conversion fails. * *

You can also extend BaseConverter to make your life easier. * * @author cbeust */ public interface IStringConverter { /** @return an object of type created from the parameter value. */ T convert(String value); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy