Skip to content

TextConverter

final class TextConverter
Package: dev.joid.lib.font.converter · Module: core · Source: TextConverter.java

The registry of the text converters, which turns any value into the string a text shows.

A String shows as it is; any other value goes to the last registered ITextConverter that supports it, otherwise to its toString().

ReturnsSignatureSummary
voidregister(ITextConverter converter) staticAdds a converter in front of the others; registering it again moves it to the front.
voidunregister(ITextConverter converter) staticRemoves a converter.
Stringconvert(Object text) staticReturns the string for text.
List<String>convertLines(Object content) staticReturns one string per element of content when it is an Iterable, otherwise a list of one string; tooltips use it for their lines.

void register(ITextConverter converter) static

Adds a converter in front of the others; registering it again moves it to the front.

void unregister(ITextConverter converter) static

Removes a converter.

String convert(Object text) static

Returns the string for text.

List<String> convertLines(Object content) static

Returns one string per element of content when it is an Iterable, otherwise a list of one string; tooltips use it for their lines.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page