Functions: FnLocalTime

1. Overview

FnLocalTime is a function hub class containing a lot of static methods to convert from various input objects to LocalTime. Those static methods return functions whose output is LocalTime and whose input can be Calendar, Date, Integer list and Timestamp among others.

2. Functions

Function nameTypeParamsDescription
calendarToLocalTimeFunction<T, LocalTime>

It converts a Calendar into a LocalTime

calendarToLocalTimeFunction<T, LocalTime>DateTimeZone dateTimeZone

It converts a Calendar into a LocalTime in the given DateTimeZone

calendarToLocalTimeFunction<T, LocalTime>Chronology chronology

It converts a Calendar into a LocalTime with the given Chronology

dateToLocalTimeFunction<T, LocalTime>

The given Date is converted into a LocalTime

dateToLocalTimeFunction<T, LocalTime>DateTimeZone dateTimeZone

The given Date is converted into a LocalTime configured with the given DateTimeZone

dateToLocalTimeFunction<T, LocalTime>Chronology chronology

The given Date is converted into a LocalTime with the given Chronology

integerFieldArrayToLocalTimeFunction<Integer[], LocalTime>

A LocalTime is created from the given Integer Array.

The valid input Integer[] represent:

  • hour (minute, second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute (second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second (millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second, millisecond
integerFieldArrayToLocalTimeFunction<Integer[], LocalTime>Chronology chronology

A LocalTime is created from the given Integer array with the specified Chronology.

The valid input Integer[] represent:

  • hour (minute, second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute (second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second (millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second, millisecond
integerFieldCollectionToLocalTimeFunction<Collection<Integer>, LocalTime>

A LocalTime is created from the given Integer Collection.

The valid input Collection<Integer> represent:

  • hour (minute, second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute (second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second (millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second, millisecond
integerFieldCollectionToLocalTimeFunction<Collection<Integer>, LocalTime>Chronology chronology

A LocalTime is created from the given Integer Collection with the specified Chronology.

The valid input Collection<Integer> represent:

  • hour (minute, second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute (second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second (millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second, millisecond
longToLocalTimeFunction<Long, LocalTime>

The given long representing the time in milliseconds is converted into a LocalTime

longToLocalTimeFunction<Long, LocalTime>DateTimeZone dateTimeZone

The given long representing the time in milliseconds is converted into a LocalTime in the given DateTimeZone

longToLocalTimeFunction<Long, LocalTime>Chronology chronology

The given long representing the time in milliseconds is converted into a LocalTime with the given Chronology

strFieldArrayToLocalTimeFunction<String[], LocalTime>

A LocalTime is created from the given String array.

The valid input String[] represent:

  • hour (minute, second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute (second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second (millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second, millisecond
strFieldArrayToLocalTimeFunction<String[], LocalTime>Chronology chronology

A LocalTime is created from the given String array with the specified Chronology

The valid input String[] represent:

  • hour (minute, second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute (second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second (millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second, millisecond
strFieldCollectionToLocalTimeFunction<Collection<String>, LocalTime>

A LocalTime is created from the given String Collection.

The valid input Collection<String> represent:

  • hour (minute, second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute (second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second (millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second, millisecond
strFieldCollectionToLocalTimeFunction<Collection<String>, LocalTime>Chronology chronology

A LocalTime is created from the given String Collection with the specified Chronology

The valid input Collection<String> represent:

  • hour (minute, second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute (second and millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second (millisecond will be set to 0 in the output LocalTime)
  • hour, minute, second, millisecond
strToLocalTimeFunction<String, LocalTime>String pattern

It converts the given String into a LocalTime using the given pattern parameter. If the pattern includes either, the name of the month or day of week, a conversion accepting a Locale must be used instead

strToLocalTimeFunction<String, LocalTime>String pattern
DateTimeZone dateTimeZone

It converts the given String into a LocalTime using the given pattern parameter and with the specified DateTimeZone. If the pattern includes either, the name of the month or day of week, a conversion accepting a Locale must be used instead

strToLocalTimeFunction<String, LocalTime>String pattern
Chronology chronology

It converts the given String into a LocalTime using the given pattern parameter with the specified Chronology. If the pattern includes either, the name of the month or day of week, a conversion accepting a Locale must be used instead

strToLocalTimeFunction<String, LocalTime>String pattern
Locale locale

It converts the given String into a LocalTime using the given pattern and Locale parameters

strToLocalTimeFunction<String, LocalTime>String pattern
String locale

It converts the given String into a LocalTime using the given pattern and Locale parameters

strToLocalTimeFunction<String, LocalTime>String pattern
Locale locale
DateTimeZone dateTimeZone

It converts the given String into a LocalTime using the given pattern and Locale parameters. The DateTime is configured with the given DateTimeZone

strToLocalTimeFunction<String, LocalTime>String pattern
String locale
DateTimeZone dateTimeZone

It converts the given String into a LocalTime using the given pattern and Locale parameters. The DateTime is configured with the given DateTimeZone

strToLocalTimeFunction<String, LocalTime>String pattern
Locale locale
Chronology chronology

It converts the given String into a LocalTime using the given pattern and Locale parameters. The DateTime will be created with the specified Chronology

strToLocalTimeFunction<String, LocalTime>String pattern
String locale
Chronology chronology

It converts the given String into a LocalTime using the given pattern and Locale parameters. The DateTime will be created with the specified Chronology

timestampToLocalTimeFunction<Timestamp, LocalTime>

The given Timestamp is converted into a LocalTime

timestampToLocalTimeFunction<Timestamp, LocalTime>DateTimeZone dateTimeZone

The given Timestamp is converted into a LocalTime in the given DateTimeZone

timestampToLocalTimeFunction<Timestamp, LocalTime>Chronology chronology

The given Timestamp is converted into a LocalTime with the given Chronology