public final class

ProgramInformation

extends java.lang.Object

 java.lang.Object

↳androidx.media3.exoplayer.dash.manifest.ProgramInformation

Gradle dependencies

compile group: 'androidx.media3', name: 'media3-exoplayer-dash', version: '1.0.0-alpha03'

  • groupId: androidx.media3
  • artifactId: media3-exoplayer-dash
  • version: 1.0.0-alpha03

Artifact androidx.media3:media3-exoplayer-dash:1.0.0-alpha03 it located at Google repository (https://maven.google.com/)

Overview

A parsed program information element.

Summary

Fields
public final java.lang.Stringcopyright

A copyright statement for the media presentation.

public final java.lang.Stringlang

Declares the language code(s) for this ProgramInformation.

public final java.lang.StringmoreInformationURL

A URL that provides more information about the media presentation.

public final java.lang.Stringsource

Information about the original source of the media presentation.

public final java.lang.Stringtitle

The title for the media presentation.

Constructors
publicProgramInformation(java.lang.String title, java.lang.String source, java.lang.String copyright, java.lang.String moreInformationURL, java.lang.String lang)

Methods
public booleanequals(java.lang.Object obj)

public inthashCode()

from java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Fields

public final java.lang.String title

The title for the media presentation.

public final java.lang.String source

Information about the original source of the media presentation.

public final java.lang.String copyright

A copyright statement for the media presentation.

public final java.lang.String moreInformationURL

A URL that provides more information about the media presentation.

public final java.lang.String lang

Declares the language code(s) for this ProgramInformation.

Constructors

public ProgramInformation(java.lang.String title, java.lang.String source, java.lang.String copyright, java.lang.String moreInformationURL, java.lang.String lang)

Methods

public boolean equals(java.lang.Object obj)

public int hashCode()

Source

/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package androidx.media3.exoplayer.dash.manifest;

import androidx.annotation.Nullable;
import androidx.media3.common.util.UnstableApi;
import androidx.media3.common.util.Util;

/** A parsed program information element. */
@UnstableApi
public final class ProgramInformation {
  /** The title for the media presentation. */
  @Nullable public final String title;

  /** Information about the original source of the media presentation. */
  @Nullable public final String source;

  /** A copyright statement for the media presentation. */
  @Nullable public final String copyright;

  /** A URL that provides more information about the media presentation. */
  @Nullable public final String moreInformationURL;

  /** Declares the language code(s) for this ProgramInformation. */
  @Nullable public final String lang;

  public ProgramInformation(
      @Nullable String title,
      @Nullable String source,
      @Nullable String copyright,
      @Nullable String moreInformationURL,
      @Nullable String lang) {
    this.title = title;
    this.source = source;
    this.copyright = copyright;
    this.moreInformationURL = moreInformationURL;
    this.lang = lang;
  }

  @Override
  public boolean equals(@Nullable Object obj) {
    if (this == obj) {
      return true;
    }
    if (!(obj instanceof ProgramInformation)) {
      return false;
    }
    ProgramInformation other = (ProgramInformation) obj;
    return Util.areEqual(this.title, other.title)
        && Util.areEqual(this.source, other.source)
        && Util.areEqual(this.copyright, other.copyright)
        && Util.areEqual(this.moreInformationURL, other.moreInformationURL)
        && Util.areEqual(this.lang, other.lang);
  }

  @Override
  public int hashCode() {
    int result = 17;
    result = 31 * result + (title != null ? title.hashCode() : 0);
    result = 31 * result + (source != null ? source.hashCode() : 0);
    result = 31 * result + (copyright != null ? copyright.hashCode() : 0);
    result = 31 * result + (moreInformationURL != null ? moreInformationURL.hashCode() : 0);
    result = 31 * result + (lang != null ? lang.hashCode() : 0);
    return result;
  }
}