Class StringToTimeTransform
- java.lang.Object
-
- org.datavec.api.transform.transform.BaseTransform
-
- org.datavec.api.transform.transform.BaseColumnTransform
-
- org.datavec.api.transform.transform.time.StringToTimeTransform
-
public class StringToTimeTransform extends BaseColumnTransform
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.datavec.api.transform.transform.BaseColumnTransform
columnName, columnNumber
-
Fields inherited from class org.datavec.api.transform.transform.BaseTransform
inputSchema
-
-
Constructor Summary
Constructors Constructor Description StringToTimeTransform(String columnName, String timeFormat, TimeZone timeZone)
StringToTimeTransform(String columnName, String timeFormat, TimeZone timeZone, Locale locale)
StringToTimeTransform(String columnName, String timeFormat, TimeZone timeZone, Locale locale, Long minValidTime, Long maxValidTime)
StringToTimeTransform(String columnName, String timeFormat, org.joda.time.DateTimeZone timeZone)
StringToTimeTransform(String columnName, String timeFormat, org.joda.time.DateTimeZone timeZone, Locale locale)
StringToTimeTransform(String columnName, String timeFormat, org.joda.time.DateTimeZone timeZone, Locale locale, Long minValidTime, Long maxValidTime)
StringToTimeTransform(String columnName, TimeZone timeZone)
Instantiate this without a time format specified.StringToTimeTransform(String columnName, TimeZone timeZone, Locale locale)
StringToTimeTransform(String columnName, org.joda.time.DateTimeZone timeZone, Locale locale)
Instantiate this without a time format specified.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnMetaData
getNewColumnMetaData(String newName, ColumnMetaData oldColumnType)
Object
map(Object input)
Transform an object in to another objectWritable
map(Writable columnWritable)
String
toString()
-
Methods inherited from class org.datavec.api.transform.transform.BaseColumnTransform
columnName, columnNames, equals, hashCode, map, mapSequence, outputColumnName, outputColumnNames, setInputSchema, transform
-
Methods inherited from class org.datavec.api.transform.transform.BaseTransform
getInputSchema, mapSequence
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.datavec.api.transform.ColumnOp
getInputSchema
-
-
-
-
Constructor Detail
-
StringToTimeTransform
public StringToTimeTransform(String columnName, TimeZone timeZone)
Instantiate this without a time format specified. If this constructor is used, this transform will be allowed to handle several common transforms as defined in the static formats array.- Parameters:
columnName
- Name of the String columntimeZone
- Timezone for time parsing
-
StringToTimeTransform
public StringToTimeTransform(String columnName, TimeZone timeZone, Locale locale)
- Parameters:
columnName
- Name of the String columntimeZone
- Timezone for time parsinglocale
- Locale for i18n
-
StringToTimeTransform
public StringToTimeTransform(String columnName, String timeFormat, TimeZone timeZone)
- Parameters:
columnName
- Name of the String columntimeFormat
- Time format, as per http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.htmltimeZone
- Timezone for time parsing
-
StringToTimeTransform
public StringToTimeTransform(String columnName, String timeFormat, TimeZone timeZone, Locale locale)
- Parameters:
columnName
- Name of the String columntimeFormat
- Time format, as per http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.htmltimeZone
- Timezone for time parsinglocale
- Locale for i18n
-
StringToTimeTransform
public StringToTimeTransform(String columnName, org.joda.time.DateTimeZone timeZone, Locale locale)
Instantiate this without a time format specified. If this constructor is used, this transform will be allowed to handle several common transforms as defined in the static formats array.- Parameters:
columnName
- Name of the String columntimeZone
- Timezone for time parsinglocale
- Locale for i18n
-
StringToTimeTransform
public StringToTimeTransform(String columnName, String timeFormat, org.joda.time.DateTimeZone timeZone)
- Parameters:
columnName
- Name of the String columntimeFormat
- Time format, as per http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.htmltimeZone
- Timezone for time parsing
-
StringToTimeTransform
public StringToTimeTransform(String columnName, String timeFormat, org.joda.time.DateTimeZone timeZone, Locale locale)
- Parameters:
columnName
- Name of the String columntimeFormat
- Time format, as per http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.htmltimeZone
- Timezone for time parsinglocale
- Locale for i18n
-
StringToTimeTransform
public StringToTimeTransform(String columnName, String timeFormat, TimeZone timeZone, Locale locale, Long minValidTime, Long maxValidTime)
- Parameters:
columnName
- Name of the String columntimeFormat
- Time format, as per http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.htmltimeZone
- Timezone for time parsinglocale
- Locale for i18nminValidTime
- Min valid time (epoch millisecond format). If null: no restriction in min valid timemaxValidTime
- Max valid time (epoch millisecond format). If null: no restriction in max valid time
-
StringToTimeTransform
public StringToTimeTransform(String columnName, String timeFormat, org.joda.time.DateTimeZone timeZone, Locale locale, Long minValidTime, Long maxValidTime)
- Parameters:
columnName
- Name of the String columntimeFormat
- Time format, as per http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.htmltimeZone
- Timezone for time parsinglocale
- Locale for i18nminValidTime
- Min valid time (epoch millisecond format). If null: no restriction in min valid timemaxValidTime
- Max valid time (epoch millisecond format). If null: no restriction in max valid time
-
-
Method Detail
-
getNewColumnMetaData
public ColumnMetaData getNewColumnMetaData(String newName, ColumnMetaData oldColumnType)
- Specified by:
getNewColumnMetaData
in classBaseColumnTransform
-
map
public Writable map(Writable columnWritable)
- Specified by:
map
in classBaseColumnTransform
-
toString
public String toString()
- Specified by:
toString
in classBaseColumnTransform
-
-