📄 albumvideo.java
字号:
package cn.myvideosite.data.model.bean;
public class AlbumVideo implements Comparable<Object> {
/**
* @param args
*/
private int id;
private int albumId;
private int videoId;
public AlbumVideo() {
super();
}
public AlbumVideo( int albumId, int videoId) {
super();
this.albumId = albumId;
this.videoId = videoId;
}
public AlbumVideo( int id,int albumId, int videoId) {
super();
this.albumId = albumId;
this.id = id;
this.videoId = videoId;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getAlbumId() {
return albumId;
}
public void setAlbumId(int albumId) {
this.albumId = albumId;
}
public int getVideoId() {
return videoId;
}
public void setVideoId(int videoId) {
this.videoId = videoId;
}
public String toString(){
StringBuffer sb=new StringBuffer("id=");
sb.append(id).append(", albumId=").append(albumId)
.append(", videoId=").append(videoId);
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + albumId;
result = prime * result + id;
result = prime * result + videoId;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
AlbumVideo other = (AlbumVideo) obj;
if (albumId != other.albumId)
return false;
if (id != other.id)
return false;
if (videoId != other.videoId)
return false;
return true;
}
public int compareTo(Object o) {
AlbumVideo other=(AlbumVideo)o;
if(albumId < other.albumId) return -1;
else if(albumId > other.albumId) return 1;
else return 0;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -