📄 replycomments.java
字号:
package cn.myvideosite.data.model.bean;
import java.util.Date;
public class ReplyComments implements Comparable<Object>{
private int replyId;
private int userId;
private Date replyTime;
private String replyText;
/**
*
*/
public ReplyComments() {
}
public ReplyComments( int userId,Date replyTime ,String replyText) {
this.replyText = replyText;
this.replyTime = replyTime;
this.userId = userId;
}
/**
* @param id
* @param replyId
* @param replyText
* @param replyTime
* @param userId
*/
public ReplyComments(int replyId,int userId,Date replyTime ,String replyText) {
this.replyId = replyId;
this.replyText = replyText;
this.replyTime = replyTime;
this.userId = userId;
}
/**
* @return the replyId
*/
public int getReplyId() {
return replyId;
}
/**
* @param replyId the replyId to set
*/
public void setReplyId(int replyId) {
this.replyId = replyId;
}
/**
* @return the userId
*/
public int getUserId() {
return userId;
}
/**
* @param userId the userId to set
*/
public void setUserId(int userId) {
this.userId = userId;
}
/**
* @return the replyTime
*/
public Date getReplyTime() {
return replyTime;
}
/**
* @param replyTime the replyTime to set
*/
public void setReplyTime(Date replyTime) {
this.replyTime = replyTime;
}
/**
* @return the replyText
*/
public String getReplyText() {
return replyText;
}
/**
* @param replyText the replyText to set
*/
public void setReplyText(String replyText) {
this.replyText = replyText;
}
public String toString(){
return new StringBuffer("replyId=").append(replyId).append("userId=").append(userId).append("replyTime=")
.append(replyTime).append("replyText=").append(replyText).toString();
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + replyId;
result = prime * result
+ ((replyTime == null) ? 0 : replyTime.hashCode());
return result;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (!(obj instanceof ReplyComments))
return false;
ReplyComments other = (ReplyComments) obj;
if (replyId != other.replyId)
return false;
if (replyTime == null) {
if (other.replyTime != null)
return false;
} else if (!replyTime.equals(other.replyTime))
return false;
return true;
}
public int compareTo(Object o){
ReplyComments other=(ReplyComments)o;
if(replyId>other.replyId) return -1;
else if(replyId<other.replyId) return 1;
else return 0;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -