@Test(expected = IllegalArgumentException.class) public void testCompareTypesDiffer1() { m1234.compareTo(l1234); }
@Override public int compareTo(MetadataTime mtime) { if (this.type.equals(mtime.getType())) return Long.compare(this.time, mtime.getTime()); else throw new IllegalArgumentException( "Cannot compare different time types: " + this + " and " + mtime); }
MetadataTime implements Comparable<MetadataTime> { @Override public int compareTo(MetadataTime mtime) { if (this.type.equals(mtime.getType())) return Long.compare(this.time, mtime.getTime()); else throw new IllegalArgumentException( "Cannot compare different time types: " + this + " and " + mtime); } }
MetadataTime implements Comparable<MetadataTime> { @Override public int compareTo(MetadataTime mtime) { if (this.type.equals(mtime.getType())) return Long.compare(this.time, mtime.getTime()); else throw new IllegalArgumentException( "Cannot compare different time types: " + this + " and " + mtime); } MetadataTime(long time, TimeType type); }
MetadataTime implements Comparable<MetadataTime> { @Override public int compareTo(MetadataTime mtime) { if (this.type.equals(mtime.getType())) return Long.compare(this.time, mtime.getTime()); else throw new IllegalArgumentException( "Cannot compare different time types: " + this + " and " + mtime); } MetadataTime(long time, TimeType type); static MetadataTime parse(String timestr); static TimeType getType(char code); static char getCode(TimeType type); char getCode(); String encode(); TimeType getType(); long getTime(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(MetadataTime mtime); }
MetadataTime implements Comparable<MetadataTime> { @Override public int compareTo(MetadataTime mtime) { if (this.type.equals(mtime.getType())) return Long.compare(this.time, mtime.getTime()); else throw new IllegalArgumentException( "Cannot compare different time types: " + this + " and " + mtime); } MetadataTime(long time, TimeType type); static MetadataTime parse(String timestr); static TimeType getType(char code); static char getCode(TimeType type); char getCode(); String encode(); TimeType getType(); long getTime(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(MetadataTime mtime);  }