Record Class CryptoProblemConfig

java.lang.Object
java.lang.Record
com.knezevic.edaf.v3.problems.crypto.CryptoProblemConfig

public record CryptoProblemConfig(int n, List<String> criteria, Map<String,Double> criterionWeights, double[] objectiveWeights, int maxDepth) extends Record
Parsed configuration payload for crypto boolean-function problems.
  • Constructor Details

    • CryptoProblemConfig

      public CryptoProblemConfig(int n, List<String> criteria, Map<String,Double> criterionWeights, double[] objectiveWeights, int maxDepth)
      Creates an instance of a CryptoProblemConfig record class.
      Parameters:
      n - the value for the n record component
      criteria - the value for the criteria record component
      criterionWeights - the value for the criterionWeights record component
      objectiveWeights - the value for the objectiveWeights record component
      maxDepth - the value for the maxDepth record component
  • Method Details

    • from

      public static CryptoProblemConfig from(Map<String,Object> params)
      Parses common crypto-problem parameters from plugin params map.
    • 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.
    • n

      public int n()
      Returns the value of the n record component.
      Returns:
      the value of the n record component
    • criteria

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

      public Map<String,Double> criterionWeights()
      Returns the value of the criterionWeights record component.
      Returns:
      the value of the criterionWeights record component
    • objectiveWeights

      public double[] objectiveWeights()
      Returns the value of the objectiveWeights record component.
      Returns:
      the value of the objectiveWeights record component
    • maxDepth

      public int maxDepth()
      Returns the value of the maxDepth record component.
      Returns:
      the value of the maxDepth record component