Commit 75dd1b43 by samrobinson Committed by Ian Baker

Add buildUpon to MediaMetadata.

PiperOrigin-RevId: 364590789
parent a68bb38a
......@@ -29,6 +29,12 @@ public final class MediaMetadata implements Bundleable {
/** A builder for {@link MediaMetadata} instances. */
public static final class Builder {
public Builder() {}
private Builder(MediaMetadata mediaMetadata) {
this.title = mediaMetadata.title;
}
@Nullable private String 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. */
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;
}
/** Returns a new {@link Builder} instance with the current {@link MediaMetadata} fields. */
public Builder buildUpon() {
return new Builder(/* mediaMetadata= */ this);
}
@Override
public boolean equals(@Nullable Object obj) {
if (this == obj) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment