ITextConverter
interface ITextConverter
Package: dev.joid.lib.font.converter · Module: core · Source: ITextConverter.java
Turns a value of a type of yours into the string that a text shows.
Description
Section titled “Description”Register one with TextConverter.register: every text, tooltip and text setter that takes an Object goes through it.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
boolean | supports(Object text) abstract | If true, this converter turns text into a string; JOID asks the converters from the last registered to the first and uses the first that answers true. |
String | convert(Object text) abstract | Returns the string that a text shows for text; JOID calls it only when supports returned true. |
Method details
Section titled “Method details”supports
Section titled “supports”boolean supports(Object text) abstract
If true, this converter turns text into a string; JOID asks the converters from the last registered to the first and uses the first that answers true.
convert
Section titled “convert”String convert(Object text) abstract
Returns the string that a text shows for text; JOID calls it only when supports returned true.
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
