Package io.papermc.asm.versioned
Record Class MergingVersionRuleFactory<R extends RewriteRule>
java.lang.Object
java.lang.Record
io.papermc.asm.versioned.MergingVersionRuleFactory<R>
- All Implemented Interfaces:
VersionedRuleFactory
public record MergingVersionRuleFactory<R extends RewriteRule>(NavigableMap<ApiVersion<?>,? extends R extends RewriteRule> versions, BinaryOperator<R extends RewriteRule> mergeFunction)
extends Record
implements VersionedRuleFactory
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.papermc.asm.versioned.VersionedRuleFactory
VersionedRuleFactory.Chain -
Field Summary
Fields inherited from interface io.papermc.asm.versioned.VersionedRuleFactory
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionMergingVersionRuleFactory(NavigableMap<ApiVersion<?>, ? extends R> versions, BinaryOperator<R> mergeFunction) Creates an instance of aMergingVersionRuleFactoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncreateRule(ApiVersion<?> apiVersion) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static <M extends RewriteRule & Mergeable<M>>
MergingVersionRuleFactory<M> mergeable(NavigableMap<? extends ApiVersion<?>, M> versions) Returns the value of themergeFunctionrecord component.final StringtoString()Returns a string representation of this record class.NavigableMap<ApiVersion<?>, ? extends R> versions()Returns the value of theversionsrecord component.
-
Constructor Details
-
Method Details
-
createRule
- Specified by:
createRulein interfaceVersionedRuleFactory
-
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. -
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). -
versions
Returns the value of theversionsrecord component.- Returns:
- the value of the
versionsrecord component
-
mergeFunction
Returns the value of themergeFunctionrecord component.- Returns:
- the value of the
mergeFunctionrecord component