本文整理汇总了Java中org.apache.commons.lang3.builder.Builder类的典型用法代码示例。如果您正苦于以下问题:Java Builder类的具体用法?Java Builder怎么用?Java Builder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Builder类属于org.apache.commons.lang3.builder包,在下文中一共展示了Builder类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initModuleSettingsPanel
import org.apache.commons.lang3.builder.Builder; //导入依赖的package包/类
protected final void initModuleSettingsPanel(VBox panel) {
panel.getStyleClass().addAll(Style.DEAULT_CONTAINER.css());
panel.getStyleClass().addAll(Style.MODULE_CONTAINER.css());
panel.getChildren().add(footer);
footer.runButton().setOnAction(event -> {
ErrorTracker errorTracker = new ErrorTracker();
Builder<? extends AbstractParameters> builder = getBuilder(errorTracker
.andThen(s -> eventStudio().broadcast(new AddNotificationRequestEvent(NotificationType.ERROR, s,
DefaultI18nContext.getInstance().i18n("Invalid parameters")))));
if (!errorTracker.errorOnBuild) {
eventStudio().broadcast(new TaskExecutionRequestEvent(id(), builder.build()));
}
});
modulePanel.setCenter(panel);
eventStudio().addAnnotatedListeners(this);
}
示例2: onCreateDialog
import org.apache.commons.lang3.builder.Builder; //导入依赖的package包/类
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final int resTitleId = getArguments().getInt(PARAM_RESOURCE_TITLE);
final int resTextId = getArguments().getInt(PARAM_RESOURCE_TEXT);
final String additionalMessage = getArguments().getString(PARAM_ADDITIONAL_MESSAGE);
final Intent intent = getArguments().getParcelable(PARAM_INTENT);
MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity())
.title(resTitleId)
.positiveText(R.string.button_ok);
if (resTextId != 0) {
builder.content(getString(resTextId, StringUtils.defaultString(additionalMessage)));
} else {
builder.content(StringUtils.defaultString(additionalMessage));
}
builder.callback(new MaterialDialog.ButtonCallback() {
@Override
public void onPositive(MaterialDialog dialog) {
if (intent != null) {
getActivity().startActivity(intent);
}
getActivity().finish();
}
});
return builder.build();
}
示例3: getBuilder
import org.apache.commons.lang3.builder.Builder; //导入依赖的package包/类
@Override
protected Builder<SplitBySizeParameters> getBuilder(Consumer<String> onError) {
SplitBySizeParametersBuilder builder = new SplitBySizeParametersBuilder();
splitOptions.apply(builder, onError);
selectionPane.apply(builder, onError);
destinationDirectoryField.apply(builder, onError);
destinationPane.apply(builder, onError);
prefix.apply(builder, onError);
return builder;
}
示例4: getBuilder
import org.apache.commons.lang3.builder.Builder; //导入依赖的package包/类
@Override
protected Builder<SplitByOutlineLevelParameters> getBuilder(Consumer<String> onError) {
SplitByOutlineLevelParametersBuilder builder = new SplitByOutlineLevelParametersBuilder();
splitOptions.apply(builder, onError);
selectionPane.apply(builder, onError);
destinationDirectoryField.apply(builder, onError);
destinationPane.apply(builder, onError);
prefix.apply(builder, onError);
return builder;
}
示例5: getBuilder
import org.apache.commons.lang3.builder.Builder; //导入依赖的package包/类
@Override
protected Builder<? extends AbstractSplitByPageParameters> getBuilder(Consumer<String> onError) {
Optional<SinglePdfSourceMultipleOutputParametersBuilder<? extends AbstractSplitByPageParameters>> builder = Optional
.ofNullable(splitOptions.getBuilder(onError));
builder.ifPresent(b -> {
selectionPane.apply(b, onError);
destinationDirectoryField.apply(b, onError);
destinationPane.apply(b, onError);
prefix.apply(b, onError);
});
return builder.orElse(null);
}
示例6: getBuilder
import org.apache.commons.lang3.builder.Builder; //导入依赖的package包/类
/**
* @param onError
* function to be called in case of error while building the task parameters
* @return a {@link Builder} for the parameters to be used to perform a pdf manipulation
*/
protected abstract Builder<? extends AbstractParameters> getBuilder(Consumer<String> onError);