public final class

Descriptor

extends java.lang.Object

 java.lang.Object

↳androidx.media3.exoplayer.dash.manifest.Descriptor

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 descriptor, as defined by ISO 23009-1, 2nd edition, 5.8.2.

Summary

Fields
public final java.lang.Stringid

The identifier, or null.

public final java.lang.StringschemeIdUri

The scheme URI.

public final java.lang.Stringvalue

The value, or null.

Constructors
publicDescriptor(java.lang.String schemeIdUri, java.lang.String value, java.lang.String id)

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 schemeIdUri

The scheme URI.

public final java.lang.String value

The value, or null.

public final java.lang.String id

The identifier, or null.

Constructors

public Descriptor(java.lang.String schemeIdUri, java.lang.String value, java.lang.String id)

Parameters:

schemeIdUri: The scheme URI.
value: The value, or null.
id: The identifier, or null.

Methods

public boolean equals(java.lang.Object obj)

public int hashCode()

Source

/*
 * Copyright (C) 2014 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 descriptor, as defined by ISO 23009-1, 2nd edition, 5.8.2. */
@UnstableApi
public final class Descriptor {

  /** The scheme URI. */
  public final String schemeIdUri;
  /** The value, or null. */
  @Nullable public final String value;
  /** The identifier, or null. */
  @Nullable public final String id;

  /**
   * @param schemeIdUri The scheme URI.
   * @param value The value, or null.
   * @param id The identifier, or null.
   */
  public Descriptor(String schemeIdUri, @Nullable String value, @Nullable String id) {
    this.schemeIdUri = schemeIdUri;
    this.value = value;
    this.id = id;
  }

  @Override
  public boolean equals(@Nullable Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null || getClass() != obj.getClass()) {
      return false;
    }
    Descriptor other = (Descriptor) obj;
    return Util.areEqual(schemeIdUri, other.schemeIdUri)
        && Util.areEqual(value, other.value)
        && Util.areEqual(id, other.id);
  }

  @Override
  public int hashCode() {
    int result = schemeIdUri.hashCode();
    result = 31 * result + (value != null ? value.hashCode() : 0);
    result = 31 * result + (id != null ? id.hashCode() : 0);
    return result;
  }
}