@Test(expected = IllegalArgumentException.class) public void testGetInstance_InvalidType() { MetadataTime.parse("X1234"); }
public static MetadataTime parse(String timestr) throws IllegalArgumentException { if (timestr != null && timestr.length() > 1) { return new MetadataTime(Long.parseLong(timestr.substring(1)), getType(timestr.charAt(0))); } else throw new IllegalArgumentException("Unknown metadata time value " + timestr); }
MetadataTime implements Comparable<MetadataTime> { public static MetadataTime parse(String timestr) throws IllegalArgumentException { if (timestr != null && timestr.length() > 1) { return new MetadataTime(Long.parseLong(timestr.substring(1)), getType(timestr.charAt(0))); } else throw new IllegalArgumentException("Unknown metadata time value " + timestr); } }
MetadataTime implements Comparable<MetadataTime> { public static MetadataTime parse(String timestr) throws IllegalArgumentException { if (timestr != null && timestr.length() > 1) { return new MetadataTime(Long.parseLong(timestr.substring(1)), getType(timestr.charAt(0))); } else throw new IllegalArgumentException("Unknown metadata time value " + timestr); } MetadataTime(long time, TimeType type); }
MetadataTime implements Comparable<MetadataTime> { public static MetadataTime parse(String timestr) throws IllegalArgumentException { if (timestr != null && timestr.length() > 1) { return new MetadataTime(Long.parseLong(timestr.substring(1)), getType(timestr.charAt(0))); } else throw new IllegalArgumentException("Unknown metadata time value " + timestr); } 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 MetadataTime parse(String timestr) throws IllegalArgumentException { if (timestr != null && timestr.length() > 1) { return new MetadataTime(Long.parseLong(timestr.substring(1)), getType(timestr.charAt(0))); } else throw new IllegalArgumentException("Unknown metadata time value " + timestr); } 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);  }