|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectnet.objectlab.kit.datecalc.common.Utils
public final class Utils
Utilities class for Date/Calendar conversions
| Method Summary | |
|---|---|
static Calendar |
blastTime(Calendar cal)
Removes set's all "time" fields to zero, leaving only the date portion of the Calendar. |
static Calendar |
createCalendar(String dateStr)
get a new Calendar based on the string date. |
static Date |
createDate(String dateStr)
Creates a Date object given a string representation of it |
static Calendar |
getCal(Date date)
Get a Calendar object for a given Date representation. |
static Calendar |
getCal(String dateStr)
|
static Set<Calendar> |
toCalendarSet(Set<Date> dates)
Converts a Set of Date objects to a Set of Calendar objects. |
static List<Date> |
toDateList(List<Calendar> dates)
Converts a List of Calendar objects to a List
of dates |
static Set<Date> |
toDateSet(Set<Calendar> calendars)
Converts a Set of Calendar objects to a Set of Date objects |
static HolidayCalendar<Calendar> |
toHolidayCalendarSet(HolidayCalendar<Date> dates)
Converts a Set of Date objects to a Set of Calendar objects. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Calendar blastTime(Calendar cal)
cal - to Calendar object to blast, note, it will be modified
public static Date createDate(String dateStr)
dateStr - string (return today if string is null)
IllegalArgumentException - if the string cannot be parsed.public static Calendar createCalendar(String dateStr)
dateStr - the date string
IllegalArgumentException - if the string cannot be parsed.public static Calendar getCal(String dateStr)
public static Calendar getCal(Date date)
date -
public static Set<Calendar> toCalendarSet(Set<Date> dates)
dates -
public static HolidayCalendar<Calendar> toHolidayCalendarSet(HolidayCalendar<Date> dates)
dates -
public static Set<Date> toDateSet(Set<Calendar> calendars)
calendars -
public static List<Date> toDateList(List<Calendar> dates)
List of Calendar objects to a List
of dates
dates -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||