HiveIntervalDayTime (Hive Storage API 2.1.1-pre-orc API)
Date: 2016-10-19

org.apache.hadoop.hive.common.type

## Class HiveIntervalDayTime

- java.lang.Object
- - org.apache.hadoop.hive.common.type.HiveIntervalDayTime

- All Implemented Interfaces:
    Comparable<HiveIntervalDayTime>

      public class HiveIntervalDayTime
      extends Object
      implements Comparable<HiveIntervalDayTime>

  Day-time interval type representing an offset in days/hours/minutes/seconds, with nanosecond precision. 1 day = 24 hours = 1440 minutes = 86400 seconds

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `nanos`
    `protected long` | `totalSeconds`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HiveIntervalDayTime()`
    `HiveIntervalDayTime(BigDecimal seconds)`
    `HiveIntervalDayTime(HiveIntervalDayTime other)`
    `HiveIntervalDayTime(int days, int hours, int minutes, int seconds, int nanos)`
    `HiveIntervalDayTime(long seconds, int nanos)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `clone()` Return a copy of this object.
    `int` | `compareTo(HiveIntervalDayTime other)`
    `boolean` | `equals(Object obj)`
    `int` | `getDays()`
    `double` | `getDouble()`
    `int` | `getHours()`
    `int` | `getMinutes()`
    `int` | `getNanos()`
    `int` | `getSeconds()`
    `long` | `getTotalSeconds()` Returns days/hours/minutes all converted into seconds.
    `int` | `hashCode()`
    `HiveIntervalDayTime` | `negate()`
    `protected void` | `normalizeSecondsAndNanos()` Ensures that the seconds and nanoseconds fields have consistent sign
    `void` | `set(BigDecimal totalSecondsBd)`
    `void` | `set(HiveIntervalDayTime other)`
    `void` | `set(int days, int hours, int minutes, int seconds, int nanos)`
    `void` | `set(long seconds, int nanos)`
    `String` | `toString()`
    `static HiveIntervalDayTime` | `valueOf(String strVal)`

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

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

- - ### Field Detail

    - #### totalSeconds

          protected long totalSeconds

    - #### nanos

          protected int nanos

  - ### Constructor Detail

    - #### HiveIntervalDayTime

          public HiveIntervalDayTime()

    - #### HiveIntervalDayTime

          public HiveIntervalDayTime(int days,
                                     int hours,
                                     int minutes,
                                     int seconds,
                                     int nanos)

    - #### HiveIntervalDayTime

          public HiveIntervalDayTime(long seconds,
                                     int nanos)

    - #### HiveIntervalDayTime

          public HiveIntervalDayTime(BigDecimal seconds)

    - #### HiveIntervalDayTime

          public HiveIntervalDayTime(HiveIntervalDayTime other)

  - ### Method Detail

    - #### getDays

          public int getDays()

    - #### getHours

          public int getHours()

    - #### getMinutes

          public int getMinutes()

    - #### getSeconds

          public int getSeconds()

    - #### getNanos

          public int getNanos()

    - #### getTotalSeconds

          public long getTotalSeconds()

      Returns days/hours/minutes all converted into seconds. Nanos still need to be retrieved using getNanos()
      Returns:

    - #### getDouble

          public double getDouble()

      Returns:
        double representation of the interval day time, accurate to nanoseconds

    - #### normalizeSecondsAndNanos

          protected void normalizeSecondsAndNanos()

      Ensures that the seconds and nanoseconds fields have consistent sign

    - #### set

          public void set(int days,
                          int hours,
                          int minutes,
                          int seconds,
                          int nanos)

    - #### set

          public void set(long seconds,
                          int nanos)

    - #### set

          public void set(BigDecimal totalSecondsBd)

    - #### set

          public void set(HiveIntervalDayTime other)

    - #### negate

          public HiveIntervalDayTime negate()

    - #### compareTo

          public int compareTo(HiveIntervalDayTime other)

      Specified by:
        `compareTo` in interface `Comparable<HiveIntervalDayTime>`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### clone

          public Object clone()

      Return a copy of this object.
      Overrides:
        `clone` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### valueOf

          public static HiveIntervalDayTime valueOf(String strVal)

Copyright © 2016 The Apache Software Foundation. All rights reserved.