Functions: FnInterval

1. Overview

FnInterval is a function hub class containing a lot of static methods to convert from various input objects to Interval. Those static methods return functions whose output is Interval and whose input can be Calendar list, BaseDateTime list, Calendar list and Long list among others.

2. Functions

Function nameTypeParamsDescription
baseDateTimeFieldArrayToIntervalFunction<T[], Interval>

The array accepted by this function, as its input, contains two BaseDateTime objects used as the start and end of the Interval returned

baseDateTimeFieldArrayToIntervalFunction<T[], Interval>DateTimeZone dateTimeZone

The array accepted by this function, as its input, contains two BaseDateTime objects used as the start and end of the Interval being created (with the given DateTimeZone)

baseDateTimeFieldArrayToIntervalFunction<T[], Interval>Chronology chronology

The array accepted by this function, as its input, contains two BaseDateTime objects used as the start and end of the Interval being created (with the given Chronology)

baseDateTimeFieldCollectionToIntervalFunction<Collection<? extends BaseDateTime>, Interval>

The two target elements accepted by this function are used as the start and end of the Interval returned

baseDateTimeFieldCollectionToIntervalFunction<Collection<? extends BaseDateTime>, Interval>DateTimeZone dateTimeZone

The two target elements accepted by this function are used as the start and end of the Interval being created with the given DateTimeZone

baseDateTimeFieldCollectionToIntervalFunction<Collection<? extends BaseDateTime>, Interval>Chronology chronology

The two target elements accepted by this function are used as the start and end of the Interval being created with the given Chronology

calendarFieldArrayToIntervalFunction<T[], Interval>

It creates an Interval from the input Calendar targets representing the start and end of the Interval

calendarFieldArrayToIntervalFunction<T[], Interval>DateTimeZone dateTimeZone

It creates an Interval from the input Calendar targets representing the start and end. Such an Interval will be created in the given DateTimeZone

calendarFieldArrayToIntervalFunction<T[], Interval>Chronology chronology

It creates an Interval from the input Calendar targets representing the start and end. The Interval will be created with the given Chronology

calendarFieldCollectionToIntervalFunction<Collection<? extends Calendar>, Interval>

It creates an Interval from the input Calendar targets used as the start and end of the Interval

calendarFieldCollectionToIntervalFunction<Collection<? extends Calendar>, Interval>DateTimeZone dateTimeZone

It creates an Interval from the input Calendar targets used as the start and end. Such an Interval will be created in the given DateTimeZone

calendarFieldCollectionToIntervalFunction<Collection<? extends Calendar>, Interval>Chronology chronology

It creates an Interval from the input Calendar targets used as the start and end. The Interval will be created with the given Chronology

dateFieldArrayToIntervalFunction<T[], Interval>

It creates an Interval from the given Date elements.

dateFieldArrayToIntervalFunction<T[], Interval>DateTimeZone dateTimeZone

It creates an Interval from the input Date elements. The Interval will be created with the given DateTimeZone

dateFieldArrayToIntervalFunction<T[], Interval>Chronology chronology

It creates an Interval from the input Date elements. The Interval will be created with the given Chronology

dateFieldCollectionToIntervalFunction<Collection<? extends Date>, Interval>

It creates an Interval from the input Date elements

dateFieldCollectionToIntervalFunction<Collection<? extends Date>, Interval>DateTimeZone dateTimeZone

It creates an Interval from the input Date elements. The Interval will be created with the given DateTimeZone

dateFieldCollectionToIntervalFunction<Collection<? extends Date>, Interval>Chronology chronology

It creates an Interval from the input Date elements. The Interval will be created with the given Chronology

integerFieldArrayToIntervalFunction<Integer[], Interval>

It converts the given Integer elements into an Interval. The target Integer elements represent the start and end of the Interval.

The accepted input Integer[] are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
integerFieldArrayToIntervalFunction<Integer[], Interval>DateTimeZone dateTimeZone

It converts the given Integer elements into an Interval with the given DateTimeZone. The target Integer elements represent the start and end of the Interval.

The accepted input Integer[] are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
integerFieldArrayToIntervalFunction<Integer[], Interval>Chronology chronology

It converts the given Integer elements into an Interval with the given Chronology. The target Integer elements represent the start and end of the Interval.

The accepted input Integer[] are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
integerFieldCollectionToIntervalFunction<Collection<Integer>, Interval>

It converts the input Integer elements into an Interval. The target Integer elements represent the start and end of the Interval.

The accepted input Collection<Integer> collections are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
integerFieldCollectionToIntervalFunction<Collection<Integer>, Interval>DateTimeZone dateTimeZone

It converts the input Integer elements into an Interval with the given DateTime. The target Integer elements represent the start and end of the Interval.

The accepted input Collection<Integer> are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
integerFieldCollectionToIntervalFunction<Collection<Integer>, Interval>Chronology chronology

It converts the given Integer elements into an Interval. with the given Chronology The target Integer elements represent the start and end of the Interval.

The accepted input Collection<Integer> are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
longFieldArrayToIntervalFunction<Long[], Interval>

The input Long targets representing the time in milliseconds will be used as the start and end of the Interval returned

longFieldArrayToIntervalFunction<Long[], Interval>DateTimeZone dateTimeZone

The input Long targets representing the time in milliseconds will be used as the start and end of the Interval returned. The Interval will be created with the given DateTimeZone

longFieldArrayToIntervalFunction<Long[], Interval>Chronology chronology

The input Long targets representing the time in milliseconds will be used as the start and end of the Interval returned. The Interval will be created with the given Chronology

longFieldCollectionToIntervalFunction<Collection<Long>, Interval>

The input Long targets representing the time in milliseconds will be used as the start and end of the Interval returned

longFieldCollectionToIntervalFunction<Collection<Long>, Interval>DateTimeZone dateTimeZone

The input Long targets representing the time in milliseconds will be used as the start and end of the Interval returned. The Interval will be created with the given DateTimeZone

longFieldCollectionToIntervalFunction<Collection<Long>, Interval>Chronology chronology

The input Long targets representing the time in milliseconds will be used as the start and end of the Interval returned. The Interval will be created with the given Chronology

strFieldArrayToIntervalFunction<String[], Interval>

It converts the input String elements into an Interval. The target String elements represent the start and end of the Interval.

The accepted input String[] are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
strFieldArrayToIntervalFunction<String[], Interval>DateTimeZone dateTimeZone

It converts the input String elements into an Interval. The target String elements represent the start and end of the Interval.

The accepted input String[] are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
strFieldArrayToIntervalFunction<String[], Interval>Chronology chronology

It converts the given String elements into an Interval. The target String elements represent the start and end of the Interval.

The accepted input String[] are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
strFieldArrayToIntervalFunction<String[], Interval>String pattern

It converts the given String elements into an Interval. The target String elements represent the start and end of the Interval.

The accepted input String[] are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
strFieldArrayToIntervalFunction<String[], Interval>String pattern
DateTimeZone dateTimeZone

It converts the input String elements into an Interval. The target String elements represent the start and end of the Interval.

The accepted input String[] are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
strFieldArrayToIntervalFunction<String[], Interval>String pattern
Chronology chronology

It converts the input String elements into an Interval. The target String elements represent the start and end of the Interval.

The accepted input String[] are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
strFieldArrayToIntervalFunction<String[], Interval>String pattern
Locale locale

It converts the input String elements into an Interval. The target String elements represent the start and end of the Interval.

The accepted input String[] are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
strFieldArrayToIntervalFunction<String[], Interval>String pattern
String locale

It converts the given String elements into an Interval. The target String elements represent the start and end of the Interval.

The accepted input String[] are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
strFieldArrayToIntervalFunction<String[], Interval>String pattern
Locale locale
DateTimeZone dateTimeZone

It converts the given String elements into an Interval. The target String elements represent the start and end of the Interval.

The accepted input String[] are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
strFieldArrayToIntervalFunction<String[], Interval>String pattern
String locale
DateTimeZone dateTimeZone

It converts the given String elements into an Interval. The target String elements represent the start and end of the Interval.

The accepted input String[] are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
strFieldArrayToIntervalFunction<String[], Interval>String pattern
Locale locale
Chronology chronology

It converts the given String elements into an Interval. The target String elements represent the start and end of the Interval.

The accepted input String[] are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
strFieldArrayToIntervalFunction<String[], Interval>String pattern
String locale
Chronology chronology

It converts the given String elements into an Interval. The target String elements represent the start and end of the Interval.

The accepted input String[] are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
strFieldCollectionToIntervalFunction<Collection<String>, Interval>

It converts the input String elements into an Interval. The target String elements represent the start and end of the Interval

The accepted input Collection<String> are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
strFieldCollectionToIntervalFunction<Collection<String>, Interval>DateTimeZone dateTimeZone

It converts the input String elements into an Interval. The target String elements represent the start and end of the Interval.

The accepted input CCollection<String> are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
strFieldCollectionToIntervalFunction<Collection<String>, Interval>Chronology chronology

It converts the input String elements into an Interval. The target String elements represent the start and end of the Interval.

The accepted input Collection<String> are:

  • year, month, day, year, month, day
  • year, month, day, hour, minute, year, month, day, hour, minute
  • year, month, day, hour, minute, second, year, month, day, hour, minute, second
  • year, month, day, hour, minute, second, millisecond, year, month, day, hour, minute, second, millisecond
strFieldCollectionToIntervalFunction<Collection<String>, Interval>String pattern

It creates an Interval using the target String elements as the start and end. The given pattern will be used to create the DateTime objects from the given String elements. If the pattern includes either, the name of the month or day of week, a conversion accepting a Locale must be used instead

strFieldCollectionToIntervalFunction<Collection<String>, Interval>String pattern
DateTimeZone dateTimeZone

It creates an Interval from the given start and end String elements using the given pattern parameter and with the given DateTimeZone. If the pattern includes either, the name of the month or day of week, a conversion accepting a Locale must be used instead

strFieldCollectionToIntervalFunction<Collection<String>, Interval>String pattern
Chronology chronology

It creates an Interval from the given start and end String elements using the given pattern parameter and with the given Chronology. If the pattern includes either, the name of the month or day of week, a conversion accepting a Locale must be used instead

strFieldCollectionToIntervalFunction<Collection<String>, Interval>String pattern
Locale locale

It creates an Interval from the given String elements using the given pattern and Locale parameters

strFieldCollectionToIntervalFunction<Collection<String>, Interval>String pattern
String locale

It creates an Interval from the given String elements using the given pattern and Locale parameters

strFieldCollectionToIntervalFunction<Collection<String>, Interval>String pattern
Locale locale
DateTimeZone dateTimeZone

It creates an Interval from the given String elements using the given pattern and Locale parameters. The given DateTimeZone will be used to create the Interval.

strFieldCollectionToIntervalFunction<Collection<String>, Interval>String pattern
String locale
DateTimeZone dateTimeZone

It creates an Interval from the given String elements using the given pattern and Locale parameters. The given DateTimeZone will be used to create the Interval.

strFieldCollectionToIntervalFunction<Collection<String>, Interval>String pattern
Locale locale
Chronology chronology

It creates an Interval from the input String elements using the given pattern and Locale parameters. The given Chronology will be used to create the Interval.

strFieldCollectionToIntervalFunction<Collection<String>, Interval>String pattern
String locale
Chronology chronology

It creates an Interval from the input String elements using the given pattern and Locale parameters. The given Chronology will be used to create the Interval.

timestampFieldArrayToIntervalFunction<Timestamp[], Interval>

The input Timestamp target elements will be used as the start and end of the Interval returned

timestampFieldArrayToIntervalFunction<Timestamp[], Interval>DateTimeZone dateTimeZone

The input Timestamp target elements will be used as the start and end of the Interval returned with the given DateTimeZone

timestampFieldArrayToIntervalFunction<Timestamp[], Interval>Chronology chronology

The input Timestamp target elements will be used as the start and end of the Interval returned with the given Chronology

timestampFieldCollectionToIntervalFunction<Collection<Timestamp>, Interval>

The input Timestamp target elements will be used as the start and end of the Interval returned

timestampFieldCollectionToIntervalFunction<Collection<Timestamp>, Interval>DateTimeZone dateTimeZone

The input Timestamp target elements will be used as the start and end of the Interval returned with the given DateTimeZone

timestampFieldCollectionToIntervalFunction<Collection<Timestamp>, Interval>Chronology chronology

The input Timestamp target elements will be used as the start and end of the Interval returned with the given Chronology