![JAR search and dependency download from the Maven repository](/logo.png)
org.cthul.strings.format.FormatConversion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cthul-strings Show documentation
Show all versions of cthul-strings Show documentation
Functions for converting strings from and to various formats,
such as roman numbers, alpha indices, Java identifiers,
and format strings.
The newest version!
package org.cthul.strings.format;
import java.io.IOException;
import java.util.Locale;
import org.cthul.strings.format.conversion.FormatConversionBase;
/**
* Converts a value to string, according to a format pattern.
*
* @author Arian Treffer
*/
public interface FormatConversion {
/**
* Appends a string representation of {@code value} to the {@code formatter}.
* Implementations should extend {@link FormatConversionBase}
* @param formatter
* @param value
* @param locale
* @param flags flags parameter, non-empty string or {@code null}
* @param width width parameter, or -1
* @param precision precision parameter, or -1
* @param formatString the original format string
* @param position position in format string after this format call
* @return additional characters that were read from {@code formatString},
* should be zero for most implementations.
* @throws IOException
*/
public int format(FormatterAPI formatter, Object value, Locale locale, String flags, int width, int precision, String formatString, int position) throws IOException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy