Add buildUpon to MediaMetadata.
PiperOrigin-RevId: 364590789
This commit is contained in:
parent
a68bb38ac4
commit
75dd1b4355
@ -29,6 +29,12 @@ public final class MediaMetadata implements Bundleable {
|
|||||||
/** A builder for {@link MediaMetadata} instances. */
|
/** A builder for {@link MediaMetadata} instances. */
|
||||||
public static final class Builder {
|
public static final class Builder {
|
||||||
|
|
||||||
|
public Builder() {}
|
||||||
|
|
||||||
|
private Builder(MediaMetadata mediaMetadata) {
|
||||||
|
this.title = mediaMetadata.title;
|
||||||
|
}
|
||||||
|
|
||||||
@Nullable private String title;
|
@Nullable private String title;
|
||||||
|
|
||||||
/** Sets the optional title. */
|
/** Sets the optional title. */
|
||||||
@ -39,7 +45,7 @@ public final class MediaMetadata implements Bundleable {
|
|||||||
|
|
||||||
/** Returns a new {@link MediaMetadata} instance with the current builder values. */
|
/** Returns a new {@link MediaMetadata} instance with the current builder values. */
|
||||||
public MediaMetadata build() {
|
public MediaMetadata build() {
|
||||||
return new MediaMetadata(this);
|
return new MediaMetadata(/* builder= */ this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,6 +59,11 @@ public final class MediaMetadata implements Bundleable {
|
|||||||
this.title = builder.title;
|
this.title = builder.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns a new {@link Builder} instance with the current {@link MediaMetadata} fields. */
|
||||||
|
public Builder buildUpon() {
|
||||||
|
return new Builder(/* mediaMetadata= */ this);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(@Nullable Object obj) {
|
public boolean equals(@Nullable Object obj) {
|
||||||
if (this == obj) {
|
if (this == obj) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user