com.duoec.doc.doclet.pojo.Chapter Maven / Gradle / Ivy
The newest version!
package com.duoec.doc.doclet.pojo;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @author xuwenzhen
*/
public class Chapter extends MongoDbEntity implements Comparable, Serializable {
private static final long serialVersionUID = 1L;
/**
* 章节名
*/
private String name;
/**
* 书的章节
*/
private List sections = new ArrayList<>();
/**
* 接口类型:restFul / dubbo / ...
*/
private Integer type;
/**
* 排序,越小越前
*/
private Integer order;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List getSections() {
return sections;
}
public void setSections(List sections) {
this.sections = sections;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
@Override
public String toString() {
return "Chapter: " + name + "[" + type + "]";
}
public Integer getOrder() {
return order;
}
public void setOrder(Integer order) {
this.order = order;
}
@Override
public int hashCode() {
return name.hashCode();
}
@Override
public boolean equals(Object obj) {
return obj != null && Chapter.class.isInstance(obj) && this.name.equals(((Chapter) obj).getName());
}
@Override
public int compareTo(Chapter o) {
return this.order - o.order;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy