Updated DataExtension API Builders (markdown)

Aurora Lahtela 2022-09-04 08:48:59 +03:00
parent a19f0e3a64
commit da508c5fbd

@ -46,7 +46,7 @@ builder.addValue(Boolean.class, builder.valueBuilder("...").buildBooleanProvidi
builder.addValue(Long.class, builder.valueBuilder("...").buildNumber(1234L)); builder.addValue(Long.class, builder.valueBuilder("...").buildNumber(1234L));
builder.addValue(Long.class, builder.valueBuilder("...").buildNumber(() -> 1234L)); builder.addValue(Long.class, builder.valueBuilder("...").buildNumber(() -> 1234L));
builder.addValue(Double.class, builder.valueBuilder("...").buildDouble(500.52)); builder.addValue(Double.class, builder.valueBuilder("...").buildDouble(500.52));
builder.addValue(Double.class, builder.valueBuilder("...").buildDouble(() ->500.52)); builder.addValue(Double.class, builder.valueBuilder("...").buildDouble(() -> 500.52));
builder.addValue(Double.class, builder.valueBuilder("...").buildPercentage(0.52)); builder.addValue(Double.class, builder.valueBuilder("...").buildPercentage(0.52));
builder.addValue(Double.class, builder.valueBuilder("...").buildPercentage(() -> 0.52)); builder.addValue(Double.class, builder.valueBuilder("...").buildPercentage(() -> 0.52));
builder.addValue(String.class, builder.valueBuilder("...").buildString("Example")); builder.addValue(String.class, builder.valueBuilder("...").buildString("Example"));
@ -55,6 +55,8 @@ builder.addValue(String[].class, builder.valueBuilder("...").buildGroup(new Stri
builder.addValue(String[].class, builder.valueBuilder("...").buildGroup(() -> new String[]{"Admin", "Moderator"})); builder.addValue(String[].class, builder.valueBuilder("...").buildGroup(() -> new String[]{"Admin", "Moderator"}));
builder.addValue(Table.class, builder.valueBuilder("...").buildTable(Table.builder()...build(), Color.BLUE)); builder.addValue(Table.class, builder.valueBuilder("...").buildTable(Table.builder()...build(), Color.BLUE));
builder.addValue(Table.class, builder.valueBuilder("...").buildTable(() -> Table.builder()...build(), Color.BLUE)); builder.addValue(Table.class, builder.valueBuilder("...").buildTable(() -> Table.builder()...build(), Color.BLUE));
return builder;
``` ```
The lambda methods can be used for method references, conditional values (eg returning null sometimes) and for throwing `NotReadyException` for a specific value. The lambda methods can be used for method references, conditional values (eg returning null sometimes) and for throwing `NotReadyException` for a specific value.