bookdetails.java

来自「java web services how to program」· Java 代码 · 共 77 行

JAVA
77
字号
// BookDetails.java
// BookDetails maintains information for one book.
package jws1casestudy.pricefinder.common;

public class BookDetails {
   
   private String title;            // book title
   private String isbn;             // book ISBN
   private String authors;          // store authors
   private String description;      // store description
   private String coverImageURL;    // cover image URL

   // public no-arg constructor
   public BookDetails() {}
   
   // get book title
   public String getTitle() 
   { 
      return title; 
   }

   // get book ISBN
   public String getIsbn() 
   {
      return isbn; 
   }

   // get authors
   public String getAuthors()
   {
      return authors;
   }

   // get book description
   public String getDescription() 
   {
      return description; 
   }

   // get image URL
   public String getCoverImageURL()
   {
      return coverImageURL;
   }

   // set book title
   public void setTitle( String title )
   {
      this.title = title;
   }

   // set book ISBN
   public void setIsbn( String isbn )
   {
      this.isbn = isbn;
   }

   // set book authors
   public void setAuthors( String authors )
   {
      this.authors = authors;
   }

   // set book description
   public void setDescription( String description )
   {
      this.description = description;
   }

   // set image URL
   public void setCoverImageURL( String coverImageURL )
   {
      this.coverImageURL = coverImageURL;
   }

} // end class BookDetails

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?