Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve consistency of JavaDoc for i18n methods #6431

Merged
merged 4 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,19 @@ public class AppLayout extends Component implements RouterLayout, HasStyle {
* <p>
* NOTE: Updating the instance that is returned from this method will not
* update the component if not set again using
* {@link AppLayout#setI18n(AppLayoutI18n)}
* {@link #setI18n(AppLayoutI18n)}
*
* @return the i18n object. It will be <code>null</code>, if the i18n
* properties are not set.
* @return the i18n object or {@code null} if no i18n object has been set
*/
public AppLayoutI18n getI18n() {
return i18n;
}

/**
* Sets the internationalization properties for this component.
* Sets the internationalization object for this component.
*
* @param i18n
* the internationalized properties, not <code>null</code>
* the i18n object, not {@code null}
*/
public void setI18n(AppLayoutI18n i18n) {
this.i18n = Objects.requireNonNull(i18n,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,19 @@ public Avatar(String name, String url) {
* Gets the internationalization object previously set for this component.
* <p>
* NOTE: Updating the instance that is returned from this method will not
* update the component if not set again using
* {@link Avatar#setI18n(AvatarI18n)}
* update the component if not set again using {@link #setI18n(AvatarI18n)}
*
* @return the i18n object. It will be <code>null</code>, If the i18n
* properties weren't set.
* @return the i18n object or {@code null} if no i18n object has been set
*/
public AvatarI18n getI18n() {
return i18n;
}

/**
* Sets the internationalization properties for this component.
* Sets the internationalization object for this component.
*
* @param i18n
* the internationalized properties, not <code>null</code>
* the i18n object, not {@code null}
*/
public void setI18n(AvatarI18n i18n) {
this.i18n = Objects.requireNonNull(i18n,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,20 +646,19 @@ public List<AvatarGroupItem> getItems() {
* <p>
* NOTE: Updating the instance that is returned from this method will not
* update the component if not set again using
* {@link AvatarGroup#setI18n(AvatarGroupI18n)}
* {@link #setI18n(AvatarGroupI18n)}
*
* @return the i18n object. It will be <code>null</code>, If the i18n
* properties weren't set.
* @return the i18n object or {@code null} if no i18n object has been set
*/
public AvatarGroupI18n getI18n() {
return i18n;
}

/**
* Sets the internationalization properties for this component.
* Sets the internationalization object for this component.
*
* @param i18n
* the internationalized properties, not <code>null</code>
* the i18n object, not {@code null}
*/
public void setI18n(AvatarGroupI18n i18n) {
this.i18n = Objects.requireNonNull(i18n,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,18 +537,17 @@ public void setKeepFilter(boolean keepFilter) {
* update the component if not set again using
* {@link #setI18n(MultiSelectComboBoxI18n)}
*
* @return the i18n object. It will be <code>null</code>, if it has not been
* set previously
* @return the i18n object or {@code null} if no i18n object has been set
*/
public MultiSelectComboBoxI18n getI18n() {
return i18n;
}

/**
* Sets the internationalization properties for this component.
* Sets the internationalization object for this component.
*
* @param i18n
* the internationalized properties, not <code>null</code>
* the i18n object, not {@code null}
*/
public void setI18n(MultiSelectComboBoxI18n i18n) {
this.i18n = Objects.requireNonNull(i18n,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,20 +419,19 @@ private void initConnector() {
* <p>
* NOTE: Updating the instance that is returned from this method will not
* update the component if not set again using
* {@link DatePicker#setI18n(DatePickerI18n)}
* {@link #setI18n(DatePickerI18n)}
*
* @return the i18n object. It will be <code>null</code>, If the i18n
* properties weren't set.
* @return the i18n object or {@code null} if no i18n object has been set
*/
public DatePickerI18n getI18n() {
return i18n;
}

/**
* Sets the internationalization properties for this component.
* Sets the internationalization object for this component.
*
* @param i18n
* the internationalized properties, not <code>null</code>
* the i18n object, not {@code null}
*/
public void setI18n(DatePickerI18n i18n) {
this.i18n = Objects.requireNonNull(i18n,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -842,8 +842,7 @@ public LocalDateTime getMax() {
* update the component if not set again using
* {@link DateTimePicker#setDatePickerI18n(DatePickerI18n)}
*
* @return the i18n object. It will be <code>null</code>, If the i18n
* properties weren't set.
* @return the i18n object or {@code null} if no i18n object has been set
*/
public DatePickerI18n getDatePickerI18n() {
return datePickerI18n;
Expand All @@ -854,7 +853,7 @@ public DatePickerI18n getDatePickerI18n() {
* component.
*
* @param i18n
* the internationalized properties, not <code>null</code>
* the i18n object, not {@code null}
*/
public void setDatePickerI18n(DatePickerI18n i18n) {
this.datePickerI18n = Objects.requireNonNull(i18n,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,21 +392,19 @@ public boolean isReverseCollapseOrder() {
* Gets the internationalization object previously set for this component.
* <p>
* NOTE: Updating the instance that is returned from this method will not
* update the component if not set again using
* {@link MenuBar#setI18n(MenuBarI18n)}
* update the component if not set again using {@link #setI18n(MenuBarI18n)}
*
* @return the i18n object. It will be <code>null</code>, If the i18n
* properties weren't set.
* @return the i18n object or {@code null} if no i18n object has been set
*/
public MenuBarI18n getI18n() {
return i18n;
}

/**
* Sets the internationalization properties for this component.
* Sets the internationalization object for this component.
*
* @param i18n
* the internationalized properties, not <code>null</code>
* the i18n object, not {@code null}
*/
public void setI18n(MenuBarI18n i18n) {
this.i18n = Objects.requireNonNull(i18n,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,17 @@ public Registration addSubmitListener(
* <p>
* NOTE: Updating the instance that is returned from this method will not
* update the component if not set again using
* {@link MessageInput#setI18n(MessageInputI18n)}.
* {@link #setI18n(MessageInputI18n)}.
*
* @return the i18n object, or {@code null} if one has not been set with
* {@link #setI18n(MessageInputI18n)}
* @return the i18n object or {@code null} if no i18n object has been set
*/
public MessageInputI18n getI18n() {
return i18n;
}

/**
* Sets the internationalization properties for this component. It enabled
* you to customize and translate the language used in the message input.
* Sets the internationalization object for this component. It enabled you
* to customize and translate the language used in the message input.
* <p>
* Note: updating the object properties after setting the i18n will not
* update the component. To make the changes effective, you need to set the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,19 @@ public class RichTextEditor
* <p>
* NOTE: Updating the instance that is returned from this method will not
* update the component if not set again using
* {@link RichTextEditor#setI18n(RichTextEditorI18n)}
* {@link #setI18n(RichTextEditorI18n)}
*
* @return the i18n object. It will be <code>null</code>, If the i18n
* properties weren't set.
* @return the i18n object or {@code null} if no i18n object has been set
*/
public RichTextEditorI18n getI18n() {
return i18n;
}

/**
* Sets the internationalization properties for this component.
* Sets the internationalization object for this component.
*
* @param i18n
* the internationalized properties, not <code>null</code>
* the i18n object, not {@code null}
*/
public void setI18n(RichTextEditorI18n i18n) {
this.i18n = Objects.requireNonNull(i18n,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,9 @@ public void setExpanded(boolean expanded) {
* Gets the internationalization object previously set for this component.
* <p>
* NOTE: Updating the instance that is returned from this method will not
* update the component if not set again using
* {@link SideNav#setI18n(SideNavI18n)}
* update the component if not set again using {@link #setI18n(SideNavI18n)}
*
* @return the i18n object. It will be <code>null</code>, If the i18n
* properties weren't set.
* @return the i18n object or {@code null} if no i18n object has been set
*/
public SideNavI18n getI18n() {
return i18n;
Expand All @@ -168,7 +166,7 @@ public SideNavI18n getI18n() {
* web component.
*
* @param i18n
* the internationalized properties, not <code>null</code>
* the i18n object, not {@code null}
*/
public void setI18n(SideNavI18n i18n) {
Objects.requireNonNull(i18n,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ public void setReceiver(Receiver receiver) {
* Set the internationalization properties for this component.
*
* @param i18n
* the internationalized properties, not <code>null</code>
* the i18n object, not {@code null}
*/
public void setI18n(UploadI18N i18n) {
this.i18n = Objects.requireNonNull(i18n,
Expand Down Expand Up @@ -714,11 +714,9 @@ void runBeforeClientResponse(SerializableConsumer<UI> command) {
* Get the internationalization object previously set for this component.
* <p>
* NOTE: Updating the instance that is returned from this method will not
* update the component if not set again using
* {@link Upload#setI18n(UploadI18N)}
* update the component if not set again using {@link #setI18n(UploadI18N)}
*
* @return the object with the i18n properties. If the i18n properties
* weren't set, the object will return <code>null</code>.
* @return the i18n object or {@code null} if no i18n object has been set
*/
public UploadI18N getI18n() {
return i18n;
Expand Down