Record Class ConstitutionalComparator.ConstitutionInfo
java.lang.Object
java.lang.Record
org.episteme.social.politics.ConstitutionalComparator.ConstitutionInfo
- All Implemented Interfaces:
Serializable
- Enclosing class:
ConstitutionalComparator
public static record ConstitutionalComparator.ConstitutionInfo(String country, boolean isFederal, boolean isPresidential, int termLength)
extends Record
implements Serializable
Structural metadata for a national constitution.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstitutionInfo(String country, boolean isFederal, boolean isPresidential, int termLength) Creates an instance of aConstitutionInforecord class. -
Method Summary
Modifier and TypeMethodDescriptioncountry()Returns the value of thecountryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisFederalrecord component.booleanReturns the value of theisPresidentialrecord component.intReturns the value of thetermLengthrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConstitutionInfo
Creates an instance of aConstitutionInforecord class.- Parameters:
country- the value for thecountryrecord componentisFederal- the value for theisFederalrecord componentisPresidential- the value for theisPresidentialrecord componenttermLength- the value for thetermLengthrecord 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. -
country
Returns the value of thecountryrecord component.- Returns:
- the value of the
countryrecord component
-
isFederal
public boolean isFederal()Returns the value of theisFederalrecord component.- Returns:
- the value of the
isFederalrecord component
-
isPresidential
public boolean isPresidential()Returns the value of theisPresidentialrecord component.- Returns:
- the value of the
isPresidentialrecord component
-
termLength
public int termLength()Returns the value of thetermLengthrecord component.- Returns:
- the value of the
termLengthrecord component
-