它给出了这些错误 类型 Email 必须实现继承的抽象方法 Comparable.compareTo(Object) 类型 Email.DateComparator 必须实现继承的抽象方法 Comparator.compare(Object, Object) 类型 Email.SubjectComparator 必须实现继承的抽象方法 Comparator .比较(对象,对象)
虽然我有
public class Email implements Comparable, Serializable
{
...
public static class DateComparator implements Comparator
{
public int compare(Email email1, Email email2)
{
return email1.getTimestamp().compareTo(email2.getTimestamp());
}
}
public static class SubjectComparator implements Comparator
{
public int compare(Email email1, Email email2)
{
return email1.getSubject().compareTo(email2.getSubject());
}
}
}
怎么修?