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
    Constructor
    Description
    GerrymanderAnalysis(double efficiencyGap, double meanMedianDiff, double declination, double overallCompactness, List<String> packedDistricts, List<String> crackedDistricts, String verdict)
    Creates an instance of a GerrymanderAnalysis record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the crackedDistricts record component.
    double
    Returns the value of the declination record component.
    double
    Returns the value of the efficiencyGap record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the meanMedianDiff record component.
    double
    Returns the value of the overallCompactness record component.
    Returns the value of the packedDistricts record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the verdict record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a GerrymanderAnalysis record class.
      Parameters:
      efficiencyGap - the value for the efficiencyGap record component
      meanMedianDiff - the value for the meanMedianDiff record component
      declination - the value for the declination record component
      overallCompactness - the value for the overallCompactness record component
      packedDistricts - the value for the packedDistricts record component
      crackedDistricts - the value for the crackedDistricts record component
      verdict - the value for the verdict record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • efficiencyGap

      public double efficiencyGap()
      Returns the value of the efficiencyGap record component.
      Returns:
      the value of the efficiencyGap record component
    • meanMedianDiff

      public double meanMedianDiff()
      Returns the value of the meanMedianDiff record component.
      Returns:
      the value of the meanMedianDiff record component
    • declination

      public double declination()
      Returns the value of the declination record component.
      Returns:
      the value of the declination record component
    • overallCompactness

      public double overallCompactness()
      Returns the value of the overallCompactness record component.
      Returns:
      the value of the overallCompactness record component
    • packedDistricts

      public List<String> packedDistricts()
      Returns the value of the packedDistricts record component.
      Returns:
      the value of the packedDistricts record component
    • crackedDistricts

      public List<String> crackedDistricts()
      Returns the value of the crackedDistricts record component.
      Returns:
      the value of the crackedDistricts record component
    • verdict

      public String verdict()
      Returns the value of the verdict record component.
      Returns:
      the value of the verdict record component