Package io.trino.jdbc

## Class TrinoIntervalYearMonth

- java.lang.Object
- - io.trino.jdbc.TrinoIntervalYearMonth

All Implemented Interfaces:
  `Comparable<TrinoIntervalYearMonth>`

    public class TrinoIntervalYearMonth
    extends Object
    implements Comparable<TrinoIntervalYearMonth>

### Constructor Summary

Constructors
`TrinoIntervalYearMonth​(int months)`
`TrinoIntervalYearMonth​(int year, int months)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `compareTo​(TrinoIntervalYearMonth o)`
`boolean` `equals​(Object obj)`
`int` `getMonths()`
`int` `hashCode()`
`String` `toString()`

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

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

### Constructor Detail

#### TrinoIntervalYearMonth

    public TrinoIntervalYearMonth​(int months)

#### TrinoIntervalYearMonth

    public TrinoIntervalYearMonth​(int year,
                                  int months)

### Method Detail

#### getMonths

    public int getMonths()

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals​(Object obj)

Overrides:
  `equals` in class `Object`

#### compareTo

    public int compareTo​(TrinoIntervalYearMonth o)

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

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`