📄 activity.java
字号:
package s3063027030;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class Activity implements Comparable<Activity>{
private String title=null;
private String description=null;
private String location=null;
private Integer hour=0;
private Integer minute=0;
private Integer year=0;
private Integer month=0;
private Integer date=0;
public Activity(){}
public Activity(Integer hour,Integer minute,Integer year,Integer month,Integer date,String title,String description,String location){
this.hour=hour;
this.minute=minute;
this.year=year;
this.month=month;
this.date=date;
this.title=title;
this.description=description;
this.location=location;
}
public void setYear(Integer year){
this.year=year;
}
public void setMonth(Integer month){
this.month=month;
}
public void setDate(Integer date){
this.date=date;
}
public void setTitle(String title){
this.title=title;
}
public void setDescription(String description){
this.description=description;
}
public void setLocation(String location){
this.location=location;
}
public void setHours(Integer hour){
this.hour=hour;
}
public void setMinutes(Integer minute){
this.minute=minute;
}
public Integer getYear(){
return year;
}
public Integer getMonth(){
return month;
}
public Integer getDate(){
return date;
}
public Integer getHour(){
return hour;
}
public Integer getMinute(){
return minute;
}
public String getTitle(){
return title;
}
public String getDescription(){
return description;
}
public String getLocation(){
return location;
}
public int compareTo(Activity activity){
int time1=hour*60+minute;
int time2=activity.hour*60+activity.minute;
return (time1<time2?-1:(time1==time2?0:1));
}
public static void main(String[] args){
DateOrganizerSystem dateOrganizerSystem=new DateOrganizerSystem();
ExecutorService exec=Executors.newCachedThreadPool();
exec.execute(dateOrganizerSystem);
DateOrganizerSystem.run(dateOrganizerSystem);
exec.shutdown();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -