Record Class BiomechanicsSimulator.BodySegment
java.lang.Object
java.lang.Record
org.episteme.social.sports.BiomechanicsSimulator.BodySegment
- All Implemented Interfaces:
Serializable
- Enclosing class:
BiomechanicsSimulator
public static record BiomechanicsSimulator.BodySegment(String name, double length, double mass, double comDistance)
extends Record
implements Serializable
Physical properties of a body segment.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBodySegment(String name, double length, double mass, double comDistance) Creates an instance of aBodySegmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thecomDistancerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublelength()Returns the value of thelengthrecord component.doublemass()Returns the value of themassrecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BodySegment
Creates an instance of aBodySegmentrecord class.- Parameters:
name- the value for thenamerecord componentlength- the value for thelengthrecord componentmass- the value for themassrecord componentcomDistance- the value for thecomDistancerecord 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
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
length
public double length()Returns the value of thelengthrecord component.- Returns:
- the value of the
lengthrecord component
-
mass
public double mass()Returns the value of themassrecord component.- Returns:
- the value of the
massrecord component
-
comDistance
public double comDistance()Returns the value of thecomDistancerecord component.- Returns:
- the value of the
comDistancerecord component
-