Record Class GerrymanderingDetector.GerrymanderAnalysis
java.lang.Object
java.lang.Record
org.episteme.social.politics.GerrymanderingDetector.GerrymanderAnalysis
- All Implemented Interfaces:
Serializable
- Enclosing class:
GerrymanderingDetector
public static record GerrymanderingDetector.GerrymanderAnalysis(double efficiencyGap, double meanMedianDiff, double declination, double overallCompactness, List<String> packedDistricts, List<String> crackedDistricts, String verdict)
extends Record
implements Serializable
Comprehensive analysis result for a full district map.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecrackedDistrictsrecord component.doubleReturns the value of thedeclinationrecord component.doubleReturns the value of theefficiencyGaprecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of themeanMedianDiffrecord component.doubleReturns the value of theoverallCompactnessrecord component.Returns the value of thepackedDistrictsrecord component.final StringtoString()Returns a string representation of this record class.verdict()Returns the value of theverdictrecord component.
-
Constructor Details
-
GerrymanderAnalysis
public GerrymanderAnalysis(double efficiencyGap, double meanMedianDiff, double declination, double overallCompactness, List<String> packedDistricts, List<String> crackedDistricts, String verdict) Creates an instance of aGerrymanderAnalysisrecord class.- Parameters:
efficiencyGap- the value for theefficiencyGaprecord componentmeanMedianDiff- the value for themeanMedianDiffrecord componentdeclination- the value for thedeclinationrecord componentoverallCompactness- the value for theoverallCompactnessrecord componentpackedDistricts- the value for thepackedDistrictsrecord componentcrackedDistricts- the value for thecrackedDistrictsrecord componentverdict- the value for theverdictrecord 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. -
efficiencyGap
public double efficiencyGap()Returns the value of theefficiencyGaprecord component.- Returns:
- the value of the
efficiencyGaprecord component
-
meanMedianDiff
public double meanMedianDiff()Returns the value of themeanMedianDiffrecord component.- Returns:
- the value of the
meanMedianDiffrecord component
-
declination
public double declination()Returns the value of thedeclinationrecord component.- Returns:
- the value of the
declinationrecord component
-
overallCompactness
public double overallCompactness()Returns the value of theoverallCompactnessrecord component.- Returns:
- the value of the
overallCompactnessrecord component
-
packedDistricts
-
crackedDistricts
-
verdict
Returns the value of theverdictrecord component.- Returns:
- the value of the
verdictrecord component
-