Record Class Birthdate
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.Birthdate
- All Implemented Interfaces:
Serializable,ApiResult
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBirthdate(int day, int month, int year) Creates an instance of aBirthdaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionintday()Returns the value of thedayrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmonth()Returns the value of themonthrecord component.final StringtoString()Returns a string representation of this record class.intyear()Returns the value of theyearrecord component.
-
Constructor Details
-
Birthdate
public Birthdate(int day, int month, int year) Creates an instance of aBirthdaterecord class.- Parameters:
day- the value for thedayrecord componentmonth- the value for themonthrecord componentyear- the value for theyearrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
day
public int day()Returns the value of thedayrecord component.- Returns:
- the value of the
dayrecord component
-
month
public int month()Returns the value of themonthrecord component.- Returns:
- the value of the
monthrecord component
-
year
public int year()Returns the value of theyearrecord component.- Returns:
- the value of the
yearrecord component
-