library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/Representation.java
public static Representation newInstance(
      long revisionId,
      Format format,
      String baseUrl,
      SegmentBase segmentBase,
      List<Descriptor> inbandEventStreams,
      String cacheKey) {
    if (segmentBase instanceof SingleSegmentBase) {
      return new SingleSegmentRepresentation(
          revisionId,
          format,
          baseUrl,
          (SingleSegmentBase) segmentBase,
          inbandEventStreams,
          cacheKey,
          C.LENGTH_UNSET);
    } else if (segmentBase instanceof MultiSegmentBase) {
      return new MultiSegmentRepresentation(
          revisionId, format, baseUrl, (MultiSegmentBase) segmentBase, inbandEventStreams);
    } else {
      throw new IllegalArgumentException("segmentBase must be of type SingleSegmentBase or "
          + "MultiSegmentBase");
    }
  }
/**
   * Constructs a new instance.
   *
   * @param revisionId Identifies the revision of the content.
   * @param format The format of the representation.
   * @param baseUrl The base URL of the representation.
   * @param segmentBase A segment base element for the representation.
   * @param inbandEventStreams The in-band event streams in the representation. May be null.
   * @param cacheKey An optional key to be returned from {@link #getCacheKey()}, or null. This
   *     parameter is ignored if {@code segmentBase} consists of multiple segments.
   * @return The constructed instance.
   */
Constructs a new instance.
@param revisionId Identifies the revision of the content.
@param format The format of the representation.
@param baseUrl The base URL of the representation.
@param segmentBase A segment base element for the representation.
@param inbandEventStreams The in-band event streams in the representation. May be null.
@param cacheKey An optional key to be returned from  #getCacheKey(), or null. This
parameter is ignored if  segmentBase consists of multiple segments.
@return The constructed instance.
Constructs a new instance . @param revisionId Identifies the revision of the content . @param format The format of the representation . @param baseUrl The base URL of the representation . @param segmentBase A segment base element for the representation . @param inbandEventStreams The in - band event streams in the representation . May be null . @param cacheKey An optional key to be returned from #getCacheKey () or null . This parameter is ignored if segmentBase consists of multiple segments . @return The constructed instance .
public static Representation newInstance(
      long revisionId,
      Format format,
      String baseUrl,
      SegmentBase segmentBase,
      List<Descriptor> inbandEventStreams,
      String cacheKey) {
    if (segmentBase instanceof SingleSegmentBase) {
      return new SingleSegmentRepresentation(
          revisionId,
          format,
          baseUrl,
          (SingleSegmentBase) segmentBase,
          inbandEventStreams,
          cacheKey,
          C.LENGTH_UNSET);
    } else if (segmentBase instanceof MultiSegmentBase) {
      return new MultiSegmentRepresentation(
          revisionId, format, baseUrl, (MultiSegmentBase) segmentBase, inbandEventStreams);
    } else {
      throw new IllegalArgumentException("segmentBase must be of type SingleSegmentBase or "
          + "MultiSegmentBase");
    }
  }
public static Representation newInstance ( long revisionId , Format format , String baseUrl , SegmentBase segmentBase , List < Descriptor > inbandEventStreams , String cacheKey ) { if ( segmentBase instanceof SingleSegmentBase ) { return new SingleSegmentRepresentation ( revisionId , format , baseUrl , ( SingleSegmentBase ) segmentBase , inbandEventStreams , cacheKey , C . LENGTH_UNSET ) ; } else if ( segmentBase instanceof MultiSegmentBase ) { return new MultiSegmentRepresentation ( revisionId , format , baseUrl , ( MultiSegmentBase ) segmentBase , inbandEventStreams ) ; } else { throw new IllegalArgumentException ( "segmentBase must be of type SingleSegmentBase or " + "MultiSegmentBase" ) ; } }
Constructs a new instance.
Constructs a new instance .