Record Class MapBasedSubstitution
java.lang.Object
java.lang.Record
tools.refinery.logic.substitution.MapBasedSubstitution
- All Implemented Interfaces:
Substitution
public record MapBasedSubstitution(Map<Variable,Variable> map, Substitution fallback)
extends Record
implements Substitution
-
Constructor Summary
ConstructorsConstructorDescriptionMapBasedSubstitution(Map<Variable, Variable> map, Substitution fallback) Creates an instance of aMapBasedSubstitutionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fallback()Returns the value of thefallbackrecord component.getSubstitute(Variable variable) final inthashCode()Returns a hash code value for this object.map()Returns the value of themaprecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface Substitution
getTypeSafeSubstitute, getTypeSafeSubstitute
-
Constructor Details
-
MapBasedSubstitution
Creates an instance of aMapBasedSubstitutionrecord class.- Parameters:
map- the value for themaprecord componentfallback- the value for thefallbackrecord component
-
-
Method Details
-
getSubstitute
- Specified by:
getSubstitutein interfaceSubstitution
-
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). -
map
-
fallback
Returns the value of thefallbackrecord component.- Returns:
- the value of the
fallbackrecord component
-