cascading.operation.text

## Class DateParser

- java.lang.Object
- - cascading.operation.BaseOperation<Pair<java.text.SimpleDateFormat,Tuple>>
  - - cascading.operation.text.DateOperation
    - - cascading.operation.text.DateParser

- All Implemented Interfaces:
    DeclaresResults, Function<Pair<java.text.SimpleDateFormat,Tuple>>, Operation<Pair<java.text.SimpleDateFormat,Tuple>>, Traceable, java.io.Serializable

      public class DateParser
      extends DateOperation
      implements Function<Pair<java.text.SimpleDateFormat,Tuple>>

  Class DateParser is used to convert a text date string to a timestamp, the number of milliseconds since January 1, 1970, 00:00:00 GMT, using the `SimpleDateFormat` syntax.

  If given, individual `Calendar` fields can be stored in unique fields for a given `TimeZone` and `Locale`.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `FIELD_NAME` Field FIELD_NAME

    - ### Fields inherited from class cascading.operation.text.DateOperation

      `locale, zone`

    - ### Fields inherited from class cascading.operation.BaseOperation

      `fieldDeclaration, numArgs, trace`

    - ### Fields inherited from interface cascading.operation.Operation

      `ANY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DateParser(Fields fieldDeclaration, int[] calendarFields, java.lang.String dateFormatString)` Constructor DateParser creates a new DateParser instance, where calendarFields is an int[] of `Calendar` field values.
    `DateParser(Fields fieldDeclaration, int[] calendarFields, java.util.TimeZone zone, java.util.Locale locale, java.lang.String dateFormatString)` Constructor DateParser creates a new DateParser instance, where calendarFields is an int[] of `Calendar` field values.
    `DateParser(Fields fieldDeclaration, java.lang.String dateFormatString)` Constructor DateParser creates a new DateParser instance.
    `DateParser(Fields fieldDeclaration, java.util.TimeZone zone, java.util.Locale locale, java.lang.String dateFormatString)` Constructor DateParser creates a new DateParser instance, where zone and locale are passed to the internal `SimpleDateFormat` instance.
    `DateParser(java.lang.String dateFormatString)` Constructor DateParser creates a new DateParser instance that creates a simple long time stamp of the parsed date.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object object)`
    `int` | `hashCode()`
    `void` | `operate(FlowProcess flowProcess, FunctionCall<Pair<java.text.SimpleDateFormat,Tuple>> functionCall)` Method operate provides the implementation of this Function.

    - ### Methods inherited from class cascading.operation.text.DateOperation

      `getCalendar, getDateFormat, getDateFormatString, prepare`

    - ### Methods inherited from class cascading.operation.BaseOperation

      `cleanup, flush, getFieldDeclaration, getNumArgs, getTrace, isSafe, printOperationInternal, toString, toStringInternal`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface cascading.operation.Operation

      `cleanup, flush, getFieldDeclaration, getNumArgs, isSafe, prepare`

- - ### Field Detail

    - #### FIELD_NAME

          public static final java.lang.String FIELD_NAME

      Field FIELD_NAME
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DateParser

          @ConstructorProperties(value="dateFormatString")
          public DateParser(java.lang.String dateFormatString)

      Constructor DateParser creates a new DateParser instance that creates a simple long time stamp of the parsed date.
      Parameters:
        `dateFormatString` - of type String

    - #### DateParser

          @ConstructorProperties(value={"fieldDeclaration","dateFormatString"})
          public DateParser(Fields fieldDeclaration,
                                          java.lang.String dateFormatString)

      Constructor DateParser creates a new DateParser instance.
      Parameters:
        `fieldDeclaration` - of type Fields
        `dateFormatString` - of type String

    - #### DateParser

          @ConstructorProperties(value={"fieldDeclaration","calendarFields","dateFormatString"})
          public DateParser(Fields fieldDeclaration,
                                          int[] calendarFields,
                                          java.lang.String dateFormatString)

      Constructor DateParser creates a new DateParser instance, where calendarFields is an int[] of `Calendar` field values. See `Calendar.get(int)`.
      Parameters:
        `fieldDeclaration` - of type Fields
        `calendarFields` - of type int[]
        `dateFormatString` - of type String

    - #### DateParser

          @ConstructorProperties(value={"fieldDeclaration","zone","locale","dateFormatString"})
          public DateParser(Fields fieldDeclaration,
                                          java.util.TimeZone zone,
                                          java.util.Locale locale,
                                          java.lang.String dateFormatString)

      Constructor DateParser creates a new DateParser instance, where zone and locale are passed to the internal `SimpleDateFormat` instance.
      Parameters:
        `fieldDeclaration` - of type Fields
        `zone` - of type TimeZone
        `locale` - of type Locale
        `dateFormatString` - of type String

    - #### DateParser

          @ConstructorProperties(value={"fieldDeclaration","calendarFields","zone","locale","dateFormatString"})
          public DateParser(Fields fieldDeclaration,
                                          int[] calendarFields,
                                          java.util.TimeZone zone,
                                          java.util.Locale locale,
                                          java.lang.String dateFormatString)

      Constructor DateParser creates a new DateParser instance, where calendarFields is an int[] of `Calendar` field values. See `Calendar.get(int)`. The `TimeZone` and/or `Locale` may also be set.
      Parameters:
        `fieldDeclaration` - of type Fields
        `calendarFields` - of type int[]
        `zone` - of type TimeZone
        `locale` - of type Locale
        `dateFormatString` - of type String

  - ### Method Detail

    - #### operate

          public void operate(FlowProcess flowProcess,
                     FunctionCall<Pair<java.text.SimpleDateFormat,Tuple>> functionCall)

      Description copied from interface: `Function`
      Method operate provides the implementation of this Function.
      Specified by:
        `operate` in interface `Function<Pair<java.text.SimpleDateFormat,Tuple>>`
      Parameters:
        `flowProcess` - of type FlowProcess
        `functionCall` - of type FunctionCall

    - #### equals

          public boolean equals(java.lang.Object object)

      Overrides:
        `equals` in class `DateOperation`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `DateOperation`

Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.