Record Class LiabilityAllocator.Party
java.lang.Object
java.lang.Record
org.episteme.social.law.LiabilityAllocator.Party
- Record Components:
name- the name of the partyfaultRatio- the ratio of fault assigned to this party (0.0 to 1.0)specificDamage- any damages specifically attributed to this party
- Enclosing class:
LiabilityAllocator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thefaultRatiorecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.doubleReturns the value of thespecificDamagerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Party
Creates an instance of aPartyrecord class.- Parameters:
name- the value for thenamerecord componentfaultRatio- the value for thefaultRatiorecord componentspecificDamage- the value for thespecificDamagerecord 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. -
name
-
faultRatio
public double faultRatio()Returns the value of thefaultRatiorecord component.- Returns:
- the value of the
faultRatiorecord component
-
specificDamage
public double specificDamage()Returns the value of thespecificDamagerecord component.- Returns:
- the value of the
specificDamagerecord component
-