@Test public void testValueOfM() { assertEquals(TimeType.MILLIS, MetadataTime.getType('M')); }
public static TimeType getType(char code) { switch (code) { case 'M': return TimeType.MILLIS; case 'L': return TimeType.LOGICAL; default: throw new IllegalArgumentException("Unknown time type code : " + code); } }
MetadataTime implements Comparable<MetadataTime> { public static TimeType getType(char code) { switch (code) { case 'M': return TimeType.MILLIS; case 'L': return TimeType.LOGICAL; default: throw new IllegalArgumentException("Unknown time type code : " + code); } } }
MetadataTime implements Comparable<MetadataTime> { public static TimeType getType(char code) { switch (code) { case 'M': return TimeType.MILLIS; case 'L': return TimeType.LOGICAL; default: throw new IllegalArgumentException("Unknown time type code : " + code); } } MetadataTime(long time, TimeType type); }
MetadataTime implements Comparable<MetadataTime> { public static TimeType getType(char code) { switch (code) { case 'M': return TimeType.MILLIS; case 'L': return TimeType.LOGICAL; default: throw new IllegalArgumentException("Unknown time type code : " + code); } } 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> { public static TimeType getType(char code) { switch (code) { case 'M': return TimeType.MILLIS; case 'L': return TimeType.LOGICAL; default: throw new IllegalArgumentException("Unknown time type code : " + code); } } 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);  }