package fr.umlv.gui.library;

/** Represents a book with an author, a title
 *  and a collection.
 *  
 * @author Rémi Forax
 */
public class Book {
  /** Initialise a new book.
   * @param author the author of the book
   * @param title the title of the book
   * @param collection the collection of the book or null
   */
  public Book(String author,String title,String collection) {
    this.author=author;
    this.title=title;
    this.collection=collection;
  }
  
  /** Returns the author of the current book.
   * @return the name of the author.
   */
  public String getAuthor() {
    return author;
  }
  
  /** Returns the title of the current book.
   * @return the text of the title.
   */
  public String getTitle() {
    return title;
  }
  
  /** Returns the collection of the current book
   *  or null if the book is not a specific collection.
   * @return may be null
   */
  public String getCollection() {
    return collection;
  }
  
  private final String author;
  private final String title;
  private final String collection;
}
