public class MonthYear extends Object
Constructor and Description |
---|
MonthYear()
Constructor.
|
MonthYear(int year,
int month)
Constructor.
|
MonthYear(int year,
int month,
int day)
Constructor.
|
MonthYear(int year,
int month,
int day,
int week)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
boolean |
equalsData(Object o)
COmpares two objects by their data withour null signs.
|
int |
getDay()
Gets a day part of the date.
|
int |
getMonth()
Gets a month part of the date.
|
int |
getWeek()
Gets a week part of the date.
|
int |
getYear()
Gets a year part of the date.
|
int |
hashCode() |
boolean |
isNull()
Checks if the data is in the null status.
|
void |
setDay(int day)
Sets a day part of the date.
|
void |
setMonth(int month)
Sets a month part of the date.
|
void |
setNull()
Sets null sign for entire object.
|
void |
setNullDay(int day)
Sets value for the day part and null flag for it.
|
void |
setNullMonth(int month)
Sets value for the month part and null flag for it.
|
void |
setNullWeek(int week)
Sets value for the week part and null flag for it.
|
void |
setNullYear(int year)
Sets value for the year part and null flag for it.
|
void |
setWeek(int week)
Sets a week part of the date.
|
void |
setYear(int year)
Sets a year part of the date.
|
String |
toString() |
public MonthYear()
public MonthYear(int year, int month)
year
- yearmonth
- monthpublic MonthYear(int year, int month, int day)
year
- yearmonth
- monthday
- daypublic MonthYear(int year, int month, int day, int week)
year
- yearmonth
- monthday
- dayweek
- weekpublic int getYear()
public void setYear(int year)
year
- a year part of the datepublic int getMonth()
public void setMonth(int month)
month
- a month part of the datepublic int getDay()
public void setDay(int day)
day
- a day part of the datepublic int getWeek()
public void setWeek(int week)
week
- a week part of the datepublic boolean equalsData(Object o)
o
- Object to compare.public void setNull()
public void setNullDay(int day)
day
- the day part value.public void setNullWeek(int week)
week
- the week part value.public void setNullMonth(int month)
month
- the month part value.public void setNullYear(int year)
year
- the year part value.public boolean isNull()
Copyright © 2005–2025 Onix Solutions. All rights reserved.