Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file 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 com.amazonaws.services.elastictranscoder.model;
 

The .jpg or .png file associated with an audio file.

 
 public class JobAlbumArt implements SerializableCloneable {

    
A policy that determines how Elastic Transcoder will handle the existence of multiple album artwork files.

  • Replace: The specified album art will replace any existing album art.
  • Prepend: The specified album art will be placed in front of any existing album art.
  • Append: The specified album art will be placed after any existing album art.
  • Fallback: If the original input file contains artwork, Elastic Transcoder will use that artwork for the output. If the original input does not contain artwork, Elastic Transcoder will use the specified album art file.

Constraints:
Pattern: (^Replace$)|(^Prepend$)|(^Append$)|(^Fallback$)

 
     private String mergePolicy;

    
The file to be used as album art. There can be multiple artworks associated with an audio file, to a maximum of 20. Valid formats are .jpg and .png
 
A policy that determines how Elastic Transcoder will handle the existence of multiple album artwork files.

  • Replace: The specified album art will replace any existing album art.
  • Prepend: The specified album art will be placed in front of any existing album art.
  • Append: The specified album art will be placed after any existing album art.
  • Fallback: If the original input file contains artwork, Elastic Transcoder will use that artwork for the output. If the original input does not contain artwork, Elastic Transcoder will use the specified album art file.

Constraints:
Pattern: (^Replace$)|(^Prepend$)|(^Append$)|(^Fallback$)

Returns:
A policy that determines how Elastic Transcoder will handle the existence of multiple album artwork files.

  • Replace: The specified album art will replace any existing album art.
  • Prepend: The specified album art will be placed in front of any existing album art.
  • Append: The specified album art will be placed after any existing album art.
  • Fallback: If the original input file contains artwork, Elastic Transcoder will use that artwork for the output. If the original input does not contain artwork, Elastic Transcoder will use the specified album art file.
 
     public String getMergePolicy() {
         return ;
     }
    
    
A policy that determines how Elastic Transcoder will handle the existence of multiple album artwork files.

  • Replace: The specified album art will replace any existing album art.
  • Prepend: The specified album art will be placed in front of any existing album art.
  • Append: The specified album art will be placed after any existing album art.
  • Fallback: If the original input file contains artwork, Elastic Transcoder will use that artwork for the output. If the original input does not contain artwork, Elastic Transcoder will use the specified album art file.

Constraints:
Pattern: (^Replace$)|(^Prepend$)|(^Append$)|(^Fallback$)

Parameters:
mergePolicy A policy that determines how Elastic Transcoder will handle the existence of multiple album artwork files.

  • Replace: The specified album art will replace any existing album art.
  • Prepend: The specified album art will be placed in front of any existing album art.
  • Append: The specified album art will be placed after any existing album art.
  • Fallback: If the original input file contains artwork, Elastic Transcoder will use that artwork for the output. If the original input does not contain artwork, Elastic Transcoder will use the specified album art file.
    public void setMergePolicy(String mergePolicy) {
        this. = mergePolicy;
    }
    
    
A policy that determines how Elastic Transcoder will handle the existence of multiple album artwork files.

  • Replace: The specified album art will replace any existing album art.
  • Prepend: The specified album art will be placed in front of any existing album art.
  • Append: The specified album art will be placed after any existing album art.
  • Fallback: If the original input file contains artwork, Elastic Transcoder will use that artwork for the output. If the original input does not contain artwork, Elastic Transcoder will use the specified album art file.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Pattern: (^Replace$)|(^Prepend$)|(^Append$)|(^Fallback$)

Parameters:
mergePolicy A policy that determines how Elastic Transcoder will handle the existence of multiple album artwork files.

  • Replace: The specified album art will replace any existing album art.
  • Prepend: The specified album art will be placed in front of any existing album art.
  • Append: The specified album art will be placed after any existing album art.
  • Fallback: If the original input file contains artwork, Elastic Transcoder will use that artwork for the output. If the original input does not contain artwork, Elastic Transcoder will use the specified album art file.
Returns:
A reference to this updated object so that method calls can be chained together.
    public JobAlbumArt withMergePolicy(String mergePolicy) {
        this. = mergePolicy;
        return this;
    }

    
The file to be used as album art. There can be multiple artworks associated with an audio file, to a maximum of 20. Valid formats are .jpg and .png

Returns:
The file to be used as album art. There can be multiple artworks associated with an audio file, to a maximum of 20. Valid formats are .jpg and .png
    public java.util.List<ArtworkgetArtwork() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<Artwork>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The file to be used as album art. There can be multiple artworks associated with an audio file, to a maximum of 20. Valid formats are .jpg and .png

Parameters:
artwork The file to be used as album art. There can be multiple artworks associated with an audio file, to a maximum of 20. Valid formats are .jpg and .png
    public void setArtwork(java.util.Collection<Artworkartwork) {
        if (artwork == null) {
            this. = null;
            return;
        }
        artworkCopy.addAll(artwork);
        this. = artworkCopy;
    }
    
    
The file to be used as album art. There can be multiple artworks associated with an audio file, to a maximum of 20. Valid formats are .jpg and .png

NOTE: This method appends the values to the existing list (if any). Use setArtwork(java.util.Collection) or withArtwork(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
artwork The file to be used as album art. There can be multiple artworks associated with an audio file, to a maximum of 20. Valid formats are .jpg and .png
Returns:
A reference to this updated object so that method calls can be chained together.
    public JobAlbumArt withArtwork(Artwork... artwork) {
        if (getArtwork() == nullsetArtwork(new java.util.ArrayList<Artwork>(artwork.length));
        for (Artwork value : artwork) {
            getArtwork().add(value);
        }
        return this;
    }
    
    
The file to be used as album art. There can be multiple artworks associated with an audio file, to a maximum of 20. Valid formats are .jpg and .png

Returns a reference to this object so that method calls can be chained together.

Parameters:
artwork The file to be used as album art. There can be multiple artworks associated with an audio file, to a maximum of 20. Valid formats are .jpg and .png
Returns:
A reference to this updated object so that method calls can be chained together.
    public JobAlbumArt withArtwork(java.util.Collection<Artworkartwork) {
        if (artwork == null) {
            this. = null;
        } else {
            artworkCopy.addAll(artwork);
            this. = artworkCopy;
        }
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getMergePolicy() != nullsb.append("MergePolicy: " + getMergePolicy() + ",");
        if (getArtwork() != nullsb.append("Artwork: " + getArtwork() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getMergePolicy() == null) ? 0 : getMergePolicy().hashCode()); 
        hashCode = prime * hashCode + ((getArtwork() == null) ? 0 : getArtwork().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof JobAlbumArt == falsereturn false;
        JobAlbumArt other = (JobAlbumArt)obj;
        
        if (other.getMergePolicy() == null ^ this.getMergePolicy() == nullreturn false;
        if (other.getMergePolicy() != null && other.getMergePolicy().equals(this.getMergePolicy()) == falsereturn false
        if (other.getArtwork() == null ^ this.getArtwork() == nullreturn false;
        if (other.getArtwork() != null && other.getArtwork().equals(this.getArtwork()) == falsereturn false
        return true;
    }
    
    @Override
    public JobAlbumArt clone() {
        try {
            return (JobAlbumArtsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X