Record Class GenealogyNetwork.Relation
java.lang.Object
java.lang.Record
org.episteme.natural.biology.genealogy.GenealogyNetwork.Relation
- All Implemented Interfaces:
Serializable
- Enclosing class:
GenealogyNetwork
public static record GenealogyNetwork.Relation(String p1, String p2, String type)
extends Record
implements Serializable
Represents a directed or undirected relation between two individuals.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.p1()Returns the value of thep1record component.p2()Returns the value of thep2record component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Relation
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
p1
Returns the value of thep1record component.- Returns:
- the value of the
p1record component
-
p2
Returns the value of thep2record component.- Returns:
- the value of the
p2record component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-