Record Class EthicalFrameworks.Action
java.lang.Object
java.lang.Record
org.episteme.social.philosophy.EthicalFrameworks.Action
- Record Components:
description- Textual description of the actionnetHappiness- projected utility (happiness/benefit) of the outcomeviolatesDuty- whether the action violates a fundamental moral duty or ruleisVirtuous- whether the action aligns with virtuous character traits
- All Implemented Interfaces:
Serializable
- Enclosing class:
EthicalFrameworks
public static record EthicalFrameworks.Action(String description, double netHappiness, boolean violatesDuty, boolean isVirtuous)
extends Record
implements Serializable
Represents a potential action in an ethical decision-making scenario.
- Version:
- 6.0, July 21, 2014
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord 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 theisVirtuousrecord component.doubleReturns the value of thenetHappinessrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theviolatesDutyrecord component.
-
Constructor Details
-
Action
Creates an instance of aActionrecord class.- Parameters:
description- the value for thedescriptionrecord componentnetHappiness- the value for thenetHappinessrecord componentviolatesDuty- the value for theviolatesDutyrecord componentisVirtuous- the value for theisVirtuousrecord 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. -
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
netHappiness
public double netHappiness()Returns the value of thenetHappinessrecord component.- Returns:
- the value of the
netHappinessrecord component
-
violatesDuty
public boolean violatesDuty()Returns the value of theviolatesDutyrecord component.- Returns:
- the value of the
violatesDutyrecord component
-
isVirtuous
public boolean isVirtuous()Returns the value of theisVirtuousrecord component.- Returns:
- the value of the
isVirtuousrecord component
-