|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcascading.tuple.type.DateType
public class DateType
Class DateCoercibleType is an implementation of CoercibleType
.
dateFormatString
, using the SimpleDateFormat
format, this CoercibleType
will convert a value from the formatted string to a Long
canonical type and back.
This class when presented with a Long timestamp value will assume the value is in UTC.
See DateParser
and DateFormatter
for similar
Operations for use within a pipe assembly.
Field Summary | |
---|---|
protected String |
dateFormatString
Field dateFormatString |
protected Locale |
locale
Field locale |
protected TimeZone |
zone
Field zone |
Constructor Summary | |
---|---|
DateType(String dateFormatString)
Create a new DateType instance. |
|
DateType(String dateFormatString,
TimeZone zone)
|
|
DateType(String dateFormatString,
TimeZone zone,
Locale locale)
Create a new DateType instance. |
Method Summary | |
---|---|
Long |
canonical(Object value)
|
Object |
coerce(Object value,
Type to)
|
protected Calendar |
getCalendar()
|
Class |
getCanonicalType()
|
SimpleDateFormat |
getDateFormat()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected TimeZone zone
protected Locale locale
protected String dateFormatString
Constructor Detail |
---|
public DateType(String dateFormatString, TimeZone zone, Locale locale)
dateFormatString
- zone
- locale
- public DateType(String dateFormatString, TimeZone zone)
public DateType(String dateFormatString)
dateFormatString
- Method Detail |
---|
public Class getCanonicalType()
getCanonicalType
in interface CoercibleType<Long>
public SimpleDateFormat getDateFormat()
protected Calendar getCalendar()
public Long canonical(Object value)
canonical
in interface CoercibleType<Long>
value
- of type Object
public Object coerce(Object value, Type to)
coerce
in interface CoercibleType<Long>
value
- of type Objectto
- of type Type
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |