001package net.bramp.ffmpeg.info; 002 003import org.apache.commons.lang3.builder.EqualsBuilder; 004import org.apache.commons.lang3.builder.HashCodeBuilder; 005 006/** Represents an individual audio channel with a name and description. */ 007public class IndividualChannel implements ChannelLayout { 008 private final String name; 009 private final String description; 010 011 /** Constructs a new individual channel with the given name and description. */ 012 public IndividualChannel(String name, String description) { 013 this.name = name; 014 this.description = description; 015 } 016 017 @Override 018 public String getName() { 019 return name; 020 } 021 022 public String getDescription() { 023 return description; 024 } 025 026 @Override 027 public String toString() { 028 return name + " " + description; 029 } 030 031 @Override 032 public boolean equals(Object obj) { 033 return EqualsBuilder.reflectionEquals(this, obj); 034 } 035 036 @Override 037 public int hashCode() { 038 return HashCodeBuilder.reflectionHashCode(this); 039 } 040}