Record Class PropertyValuePair<T>
java.lang.Object
java.lang.Record
nl.pim16aap2.animatedarchitecture.core.structures.properties.PropertyValuePair<T>
- Type Parameters:
T- The type of the property.- Record Components:
property- The property.value- The value of the property.
Represents a property-value pair.
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyValuePair(Property<T> property, IPropertyValue<T> value) Creates an instance of aPropertyValuePairrecord 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.static <T> PropertyValuePair<?> of(Property<T> property, IPropertyValue<?> value) Creates a new property-value pair.property()Returns the value of thepropertyrecord component.@Nullable TShortcut forvalue().IPropertyValue.value().final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
PropertyValuePair
-
-
Method Details
-
of
Creates a new property-value pair.- Parameters:
property- The property.value- The value of the property.- Returns:
- A new property-value pair.
- Throws:
IllegalArgumentException- If the value is not of the correct type for the property.
-
propertyValue
Shortcut forvalue().IPropertyValue.value().- Returns:
- The value of the property.
-
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). -
property
-
value
-