@Test public void testCompareToBigger() { Datable first = new Datable("20131011"); Datable second = new Datable("20131010"); assertEquals(1, first.compareTo(second)); }
@Override public int compareTo(Datable other) { if (other == null) { throw new NullPointerException(); } int compareFrom = getFromDate().compareTo(other.getFromDate()); return (compareFrom != 0) ? compareFrom : (getToDate().compareTo(other.getToDate())); }
Datable implements Comparable<Datable>, Serializable, Range { @Override public int compareTo(Datable other) { if (other == null) { throw new NullPointerException(); } int compareFrom = getFromDate().compareTo(other.getFromDate()); return (compareFrom != 0) ? compareFrom : (getToDate().compareTo(other.getToDate())); } }
Datable implements Comparable<Datable>, Serializable, Range { @Override public int compareTo(Datable other) { if (other == null) { throw new NullPointerException(); } int compareFrom = getFromDate().compareTo(other.getFromDate()); return (compareFrom != 0) ? compareFrom : (getToDate().compareTo(other.getToDate())); } Datable(String edtf); }
Datable implements Comparable<Datable>, Serializable, Range { @Override public int compareTo(Datable other) { if (other == null) { throw new NullPointerException(); } int compareFrom = getFromDate().compareTo(other.getFromDate()); return (compareFrom != 0) ? compareFrom : (getToDate().compareTo(other.getToDate())); } Datable(String edtf); String getEdtf(); boolean isFloruit(); Certainty getCertainty(); Date getFromDate(); Date getToDate(); @Override @JsonValue String toString(); int getFromYear(); int getToYear(); @Override int compareTo(Datable other); @Override boolean equals(Object obj); @Override int hashCode(); @Override boolean isValid(); @Override Object getUpperLimit(); @Override Object getLowerLimit(); }
Datable implements Comparable<Datable>, Serializable, Range { @Override public int compareTo(Datable other) { if (other == null) { throw new NullPointerException(); } int compareFrom = getFromDate().compareTo(other.getFromDate()); return (compareFrom != 0) ? compareFrom : (getToDate().compareTo(other.getToDate())); } Datable(String edtf); String getEdtf(); boolean isFloruit(); Certainty getCertainty(); Date getFromDate(); Date getToDate(); @Override @JsonValue String toString(); int getFromYear(); int getToYear(); @Override int compareTo(Datable other); @Override boolean equals(Object obj); @Override int hashCode(); @Override boolean isValid(); @Override Object getUpperLimit(); @Override Object getLowerLimit();  }