Record Class InternationalTreatyModel.Treaty
java.lang.Object
java.lang.Record
org.episteme.social.law.InternationalTreatyModel.Treaty
- Enclosing class:
InternationalTreatyModel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theabbreviationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of thepartyStatusrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theyearAdoptedrecord component.
-
Constructor Details
-
Treaty
public Treaty(String name, String abbreviation, int yearAdopted, Map<String, InternationalTreatyModel.RatificationStatus> partyStatus) Creates an instance of aTreatyrecord class.- Parameters:
name- the value for thenamerecord componentabbreviation- the value for theabbreviationrecord componentyearAdopted- the value for theyearAdoptedrecord componentpartyStatus- the value for thepartyStatusrecord component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
abbreviation
Returns the value of theabbreviationrecord component.- Returns:
- the value of the
abbreviationrecord component
-
yearAdopted
public int yearAdopted()Returns the value of theyearAdoptedrecord component.- Returns:
- the value of the
yearAdoptedrecord component
-
partyStatus
Returns the value of thepartyStatusrecord component.- Returns:
- the value of the
partyStatusrecord component
-