public class Year extends Object implements Serializable
Constructor and Description |
---|
Year(int year)
Constructs a Year with the given values
No timezone is specified
|
Year(int year,
String timezone)
Constructs a Year with the given values, including a timezone string
The timezone is validated but not used.
|
Year(String source)
Construct a Year from a String in the format [-]CCYY[timezone]
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getTimezone() |
int |
getYear() |
int |
hashCode()
Return the value of year XORed with the hashCode of timezone
iff one is defined.
|
void |
setTimezone(String timezone) |
void |
setValue(int year) |
void |
setValue(int year,
String timezone) |
void |
setYear(int year) |
String |
toString() |
public Year(int year) throws NumberFormatException
NumberFormatException
public Year(int year, String timezone) throws NumberFormatException
NumberFormatException
public Year(String source) throws NumberFormatException
NumberFormatException
public int getYear()
public void setYear(int year)
public String getTimezone()
public void setTimezone(String timezone)
public void setValue(int year, String timezone) throws NumberFormatException
NumberFormatException
public void setValue(int year) throws NumberFormatException
NumberFormatException
Copyright © The Apache Software Foundation. All Rights Reserved.