public class HiveIntervalYearMonth extends Object implements Comparable<HiveIntervalYearMonth>
Modifier and Type | Field and Description |
---|---|
protected static int |
MONTHS_PER_YEAR |
protected int |
totalMonths |
Constructor and Description |
---|
HiveIntervalYearMonth() |
HiveIntervalYearMonth(HiveIntervalYearMonth hiveInterval) |
HiveIntervalYearMonth(int totalMonths) |
HiveIntervalYearMonth(int years,
int months) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(HiveIntervalYearMonth other) |
boolean |
equals(Object obj) |
int |
getMonths() |
int |
getTotalMonths() |
int |
getYears() |
int |
hashCode() |
HiveIntervalYearMonth |
negate() |
void |
set(HiveIntervalYearMonth other) |
void |
set(int totalMonths) |
void |
set(int years,
int months) |
String |
toString() |
static HiveIntervalYearMonth |
valueOf(String strVal) |
protected int totalMonths
protected static final int MONTHS_PER_YEAR
public HiveIntervalYearMonth()
public HiveIntervalYearMonth(int years, int months)
public HiveIntervalYearMonth(int totalMonths)
public HiveIntervalYearMonth(HiveIntervalYearMonth hiveInterval)
public int getYears()
public int getMonths()
public int getTotalMonths()
public void set(int years, int months)
public void set(int totalMonths)
public void set(HiveIntervalYearMonth other)
public HiveIntervalYearMonth negate()
public int compareTo(HiveIntervalYearMonth other)
compareTo
in interface Comparable<HiveIntervalYearMonth>
public static HiveIntervalYearMonth valueOf(String strVal)
Copyright © 2017 The Apache Software Foundation. All rights reserved.