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.
Description
Section titled “Description”A String shows as it is; any other value goes to the last registered ITextConverter that supports it, otherwise to its toString().
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
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. |
Method details
Section titled “Method details”register
Section titled “register”void register(ITextConverter converter) static
Adds a converter in front of the others; registering it again moves it to the front.
unregister
Section titled “unregister”void unregister(ITextConverter converter) static
Removes a converter.
convert
Section titled “convert”String convert(Object text) static
Returns the string for text.
convertLines
Section titled “convertLines”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
