book.java
来自「《Ajax开发精要〉〉该书详细的介绍了关于Ajax和java相关的开发知识」· Java 代码 · 共 45 行
JAVA
45 行
package com.ajaxlab.ajax;
import java.util.*;
public class Book {
private String title = "";//书名
private String author = "";//作者
private String publisher = "";//出版社
private Collection chapteres = new ArrayList();//目录
public Book() {
}
public Book(String title, String author, String publisher) {
this.title = title;
this.author = author;
this.publisher = publisher;
}
public String getTitle() {
return this.title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthor() {
return this.author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getPublisher() {
return this.publisher;
}
public void setPublisher(String publisher) {
this.publisher = publisher;
}
public Collection getChapteres() {
return this.chapteres;
}
public void addChapter(Chapter chapter) {
if(!chapteres.contains(chapter.getId()))
chapteres.add(chapter);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?