Widget¶
- public class demo.Widget implements Transformer<String>[source]¶
A widget with a unified Java API and handwritten guides.
Call
#convert(int)or the text overload. Types such asInstant,java.util.Map.Entry, andString#substring(int, int)link to configured external Javadoc.Preserves structure and emphasis.
Supports nested lists:
Read.
Transform.
Widget widget = new Widget(); String result = widget.convert(42); if (result.length() > 0) { System.out.println(result); }
First lineSecond lineThird lineLast line.Try query parameters.
An inline snippet:
String value = widget.convert(7); System.out.println(value);
Conversion examples¶ Call
Result
Notes
widget.convert(42)"42"Labelled "widget"; long names such as
com.example.widgets.configuration.DefaultWidgetLabelProviderstay inside the table- See also:
- Since:
1.0
Constructors¶
Constructs a widget. |
|
Constructs a named widget. |
Fields and constants¶
Default label. |
|
A protected extension point. |
Methods¶
Builds a generic index. |
|
Combines array and variable arguments. |
|
Converts a number to text. |
|
Transforms a value using |
|
Deprecated. Old entry point. |
- public <T extends Number & Comparable<T>> Map<T, List<? extends CharSequence>> buildIndex(List<? extends T> values, Map<T, List<? extends CharSequence>> fallback)[source]¶
Builds a generic index.
- Type parameters:
<T> – comparable numeric key
- Parameters:
values – input values
fallback – default entries
- Returns:
grouped entries
- public String[] combine(int[][] values, String... labels)[source]¶
Combines array and variable arguments.
- Parameters:
values – input arrays
labels – labels
- Returns:
the labels
- public String convert(int number)[source]¶
Converts a number to text.
- Parameters:
number – the number
- Returns:
decimal text
- @Override public String convert(String renamed) throws IllegalArgumentException[source]¶
Transforms a value using
Widget#convert(int)when needed.The result preserves <angle brackets>.
- Parameters:
renamed – the value to transform
- Returns:
the transformed value
- Throws:
java.lang.IllegalArgumentException – if the value is invalid
if the value is empty
- @Deprecated(since="1.0", forRemoval=true) public void old()[source]¶
Deprecated: Use
#convert(int).Old entry point.