@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","ButtonIF"}) @Immutable public final class Button extends Object implements ButtonIF
ButtonIF.
Use the builder to create immutable instances:
Button.builder().
Use the static factory method to create immutable instances:
Button.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
Button.Builder
Builds instances of type
Button. |
| Modifier and Type | Method and Description |
|---|---|
static Button.Builder |
builder()
Creates a builder for
Button. |
static Button |
copyOf(ButtonIF instance)
Creates an immutable copy of a
ButtonIF value. |
boolean |
equals(Object another)
This instance is equal to all instances of
Button that have equal attribute values. |
String |
getActionId() |
Optional<ConfirmationDialog> |
getConfirmationDialog() |
Optional<String> |
getStyle() |
Text |
getText() |
String |
getType() |
Optional<String> |
getUrl() |
Optional<String> |
getValue() |
int |
hashCode()
Computes a hash code from attributes:
type, text, actionId, url, value, style, confirmationDialog. |
static Button |
of(Text text,
String actionId)
Construct a new immutable
Button instance. |
String |
toString()
Prints the immutable value
Button with attribute values. |
Button |
withActionId(String actionId)
Copy the current immutable object by setting a value for the
actionId attribute. |
Button |
withConfirmationDialog(ConfirmationDialog value)
Copy the current immutable object by setting a present value for the optional
confirmationDialog attribute. |
Button |
withConfirmationDialog(Optional<ConfirmationDialog> optional)
Copy the current immutable object by setting an optional value for the
confirmationDialog attribute. |
Button |
withStyle(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
style attribute. |
Button |
withStyle(String value)
Copy the current immutable object by setting a present value for the optional
style attribute. |
Button |
withText(Text text)
Copy the current immutable object by setting a value for the
text attribute. |
Button |
withUrl(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
url attribute. |
Button |
withUrl(String value)
Copy the current immutable object by setting a present value for the optional
url attribute. |
Button |
withValue(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
value attribute. |
Button |
withValue(String value)
Copy the current immutable object by setting a present value for the optional
value attribute. |
public String getType()
getType in interface BlockElementgetType in interface ButtonIFtype attributepublic Text getText()
public String getActionId()
getActionId in interface ButtonIFactionId attributepublic Optional<ConfirmationDialog> getConfirmationDialog()
getConfirmationDialog in interface ButtonIFconfirmationDialog attributepublic final Button withText(Text text)
text attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.text - A new value for textthis objectpublic final Button withActionId(String actionId)
actionId attribute.
An equals check used to prevent copying of the same value by returning this.actionId - A new value for actionIdthis objectpublic final Button withUrl(@Nullable String value)
url attribute.value - The value for url, null is accepted as java.util.Optional.empty()this objectpublic final Button withUrl(Optional<String> optional)
url attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for urlthis objectpublic final Button withValue(@Nullable String value)
value attribute.value - The value for value, null is accepted as java.util.Optional.empty()this objectpublic final Button withValue(Optional<String> optional)
value attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for valuethis objectpublic final Button withStyle(@Nullable String value)
style attribute.value - The value for style, null is accepted as java.util.Optional.empty()this objectpublic final Button withStyle(Optional<String> optional)
style attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for stylethis objectpublic final Button withConfirmationDialog(@Nullable ConfirmationDialog value)
confirmationDialog attribute.value - The value for confirmationDialog, null is accepted as java.util.Optional.empty()this objectpublic final Button withConfirmationDialog(Optional<ConfirmationDialog> optional)
confirmationDialog attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for confirmationDialogthis objectpublic boolean equals(@Nullable Object another)
Button that have equal attribute values.public int hashCode()
type, text, actionId, url, value, style, confirmationDialog.public String toString()
Button with attribute values.public static Button of(Text text, String actionId)
Button instance.text - The value for the text attributeactionId - The value for the actionId attributepublic static Button copyOf(ButtonIF instance)
ButtonIF value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static Button.Builder builder()
Button.Copyright © 2019. All rights reserved.