getAllButMillisSecondsAndMinutes

This commit is contained in:
Olof Larsson 2014-08-21 00:37:30 +02:00
parent d1b6388c33
commit 81f5a623cb

View File

@ -49,6 +49,14 @@ public class TimeUnit implements Comparable<TimeUnit>
ret.remove(SECOND); ret.remove(SECOND);
return ret; return ret;
} }
public static TreeSet<TimeUnit> getAllButMillisSecondsAndMinutes()
{
TreeSet<TimeUnit> ret = new TreeSet<TimeUnit>(all);
ret.remove(MILLISECOND);
ret.remove(SECOND);
ret.remove(MINUTE);
return ret;
}
public static TimeUnit get(String timeUnitString) public static TimeUnit get(String timeUnitString)
{ {