-
-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #372 from anfanik/master
Bot API 7.2
- Loading branch information
Showing
26 changed files
with
753 additions
and
17 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
library/src/main/java/com/pengrad/telegrambot/model/Birthdate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.pengrad.telegrambot.model; | ||
|
||
import java.io.Serializable; | ||
import java.util.Objects; | ||
|
||
public class Birthdate implements Serializable { | ||
|
||
private static final long serialVersionUID = 0L; | ||
|
||
private Integer day; | ||
private Integer month; | ||
private Integer year; | ||
|
||
public Integer day() { | ||
return day; | ||
} | ||
|
||
public Integer month() { | ||
return month; | ||
} | ||
|
||
public Integer year() { | ||
return year; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (!(o instanceof Birthdate)) return false; | ||
Birthdate birthdate = (Birthdate) o; | ||
return Objects.equals(day, birthdate.day) | ||
&& Objects.equals(month, birthdate.month) | ||
&& Objects.equals(year, birthdate.year); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(day, month, year); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Birthday{" + | ||
"day=" + day + | ||
", month=" + month + | ||
", year=" + year + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.