package pojo;

import java.io.Serializable;

public class Book implements Comparable<Book>, Serializable{
	private int num; //编号
	private String title; //书名
	private String author; //作者
	private boolean borrow = true; //是否可借阅
	private int time; //借阅次数
	
	public Book() {
		
	}
	
	public Book(int num, String title, String author, int time) {
		super();
		this.num = num;
		this.title = title;
		this.author = author;
		this.borrow = borrow;
		this.time = time;
	}
	
	public Book(int num, String title, String author) {
		super();
		this.num = num;
		this.title = title;
		this.author = author;
		this.borrow = borrow;
	}
	
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public boolean isBorrow() {
		return borrow;
	}
	public void setBorrow(boolean borrow) {
		this.borrow = borrow;
	}
	public int getTime() {
		return time;
	}
	public void setTime(int time) {
		this.time = time;
	}

	@Override
	public int compareTo(Book b) {
		// TODO Auto-generated method stub
		if(this.time > b.time){
			return -1;
		}else if(this.time < b.time){
			return 1;
		}
		return 0;
	}
}
最近下载更多
yuexiaolong  LV1 2023年7月4日
user0810  LV4 2023年1月5日
770823669  LV6 2022年10月3日
wyx065747  LV67 2022年4月1日
benbosn  LV15 2022年2月11日
Demo1111  LV30 2021年12月11日
wangyunhao  LV10 2021年12月9日
392742064  LV1 2021年9月26日
zktotti 2021年6月23日
暂无贡献等级
itcontect  LV9 2021年1月20日
最近浏览更多
woldxy  LV12 4月1日
akittyboy  LV9 3月22日
wenMN1994  LV13 2月6日
lshlsh 2023年12月25日
暂无贡献等级
李朝磊  LV18 2023年12月3日
sunshine9920  LV12 2023年10月23日
2036495585  LV9 2023年9月25日
KAIzx11  LV7 2023年6月25日
LongTory  LV2 2023年6月6日
CL200228  LV4 2023年4月15日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友