FileDocCategorySizeDatePackage
Book.javaAPI DocExample876Thu Apr 05 21:28:38 BST 2001None

Book

public class Book extends Object

Fields Summary
String
isbn
String
title
String
author
private static Book
JSERVLET
private static Book
HOBBIT
Constructors Summary
private Book(String isbn, String title, String author)

    this.isbn = isbn;
    this.title = title;
    this.author = author;
  
Methods Summary
public java.lang.StringgetAuthor()

    return author;
  
public static BookgetBook(java.lang.String isbn)


  // Here we simulate a database lookup
       
    if (JSERVLET.getISBN().equals(isbn)) {
      return JSERVLET;
    }
    else if (HOBBIT.getISBN().equals(isbn)) {
      return HOBBIT;
    }
    else {
      return null;
    }
  
public java.lang.StringgetISBN()

    return isbn;
  
public java.lang.StringgetTitle()

    return title;