@Test public void parseTime() { assertEquals(new Time(10, 12), Time.parseTime("10:12", ":")); }
public static Time parseTime(String time, String separator) { if (time == null) { return null; } String[] strings = StringUtils.split(time, separator); if (strings.length != 2) { throw new IllegalArgumentException(); } return new Time(Integer.parseInt(strings[0]), Integer.parseInt(strings[1])); }
Time implements Comparable<Time>, Serializable { public static Time parseTime(String time, String separator) { if (time == null) { return null; } String[] strings = StringUtils.split(time, separator); if (strings.length != 2) { throw new IllegalArgumentException(); } return new Time(Integer.parseInt(strings[0]), Integer.parseInt(strings[1])); } }
Time implements Comparable<Time>, Serializable { public static Time parseTime(String time, String separator) { if (time == null) { return null; } String[] strings = StringUtils.split(time, separator); if (strings.length != 2) { throw new IllegalArgumentException(); } return new Time(Integer.parseInt(strings[0]), Integer.parseInt(strings[1])); } Time();  Time(int hour, int minute);  Time(LocalTime localTime);  Time(String timeStr); }
Time implements Comparable<Time>, Serializable { public static Time parseTime(String time, String separator) { if (time == null) { return null; } String[] strings = StringUtils.split(time, separator); if (strings.length != 2) { throw new IllegalArgumentException(); } return new Time(Integer.parseInt(strings[0]), Integer.parseInt(strings[1])); } Time();  Time(int hour, int minute);  Time(LocalTime localTime);  Time(String timeStr); String timeStr(); Integer getHour(); void setHour(Integer hour); Integer getMinute(); void setMinute(Integer minute); DateTime toDateTime(DateTime dateTime); DateTime toDateTime(LocalDate date); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static Time parseTime(String time, String separator); @Override int compareTo(Time otherTime); boolean isBefore(Time other); boolean isAfter(Time other); boolean isBeforeOrEqual(Time other); boolean isAfterOrEqual(Time other); boolean isBetween(Time start, Time end); static Time valueOf(String str); }
Time implements Comparable<Time>, Serializable { public static Time parseTime(String time, String separator) { if (time == null) { return null; } String[] strings = StringUtils.split(time, separator); if (strings.length != 2) { throw new IllegalArgumentException(); } return new Time(Integer.parseInt(strings[0]), Integer.parseInt(strings[1])); } Time();  Time(int hour, int minute);  Time(LocalTime localTime);  Time(String timeStr); String timeStr(); Integer getHour(); void setHour(Integer hour); Integer getMinute(); void setMinute(Integer minute); DateTime toDateTime(DateTime dateTime); DateTime toDateTime(LocalDate date); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static Time parseTime(String time, String separator); @Override int compareTo(Time otherTime); boolean isBefore(Time other); boolean isAfter(Time other); boolean isBeforeOrEqual(Time other); boolean isAfterOrEqual(Time other); boolean isBetween(Time start, Time end); static Time valueOf(String str);  }