Record Class SingleIdentifiedObjectVariationScope
java.lang.Object
java.lang.Record
com.amalgamasimulation.studies.core.SingleIdentifiedObjectVariationScope
- All Implemented Interfaces:
VariationScope
public record SingleIdentifiedObjectVariationScope(String objectsType, String identifier)
extends Record
implements VariationScope
-
Constructor Summary
ConstructorsConstructorDescriptionSingleIdentifiedObjectVariationScope(String objectsType, String identifier) Creates an instance of aSingleIdentifiedObjectVariationScoperecord class. -
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.Returns the value of theidentifierrecord component.Returns the value of theobjectsTyperecord component.booleanfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SingleIdentifiedObjectVariationScope
Creates an instance of aSingleIdentifiedObjectVariationScoperecord class.- Parameters:
objectsType- the value for theobjectsTyperecord componentidentifier- the value for theidentifierrecord component
-
-
Method Details
-
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. -
predicate
- Specified by:
predicatein interfaceVariationScope
-
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. -
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). -
objectsType
Returns the value of theobjectsTyperecord component.- Specified by:
objectsTypein interfaceVariationScope- Returns:
- the value of the
objectsTyperecord component
-
identifier
Returns the value of theidentifierrecord component.- Returns:
- the value of the
identifierrecord component
-