Package com.mojang.datafixers.functions
Record Class PointFreeRule.Choice2
java.lang.Object
java.lang.Record
com.mojang.datafixers.functions.PointFreeRule.Choice2
- All Implemented Interfaces:
PointFreeRule
- Enclosing interface:
- PointFreeRule
public static record PointFreeRule.Choice2(PointFreeRule first, PointFreeRule second)
extends Record
implements PointFreeRule
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mojang.datafixers.functions.PointFreeRule
PointFreeRule.All, PointFreeRule.AppNest, PointFreeRule.BangEta, PointFreeRule.CataFuseDifferent, PointFreeRule.CataFuseSame, PointFreeRule.Choice, PointFreeRule.Choice2, PointFreeRule.CompRewrite, PointFreeRule.Everywhere, PointFreeRule.LensAppId, PointFreeRule.LensComp, PointFreeRule.Many, PointFreeRule.Nop, PointFreeRule.Once, PointFreeRule.One, PointFreeRule.Seq, PointFreeRule.SortInj, PointFreeRule.SortProj
-
Constructor Summary
ConstructorDescriptionChoice2
(PointFreeRule first, PointFreeRule second) Creates an instance of aChoice2
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.first()
Returns the value of thefirst
record component.final int
hashCode()
Returns a hash code value for this object.second()
Returns the value of thesecond
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.mojang.datafixers.functions.PointFreeRule
rewriteOrNop
-
Constructor Details
-
Choice2
Creates an instance of aChoice2
record class.- Parameters:
first
- the value for thefirst
record componentsecond
- the value for thesecond
record component
-
-
Method Details
-
rewrite
- Specified by:
rewrite
in interfacePointFreeRule
-
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)
. -
first
Returns the value of thefirst
record component.- Returns:
- the value of the
first
record component
-
second
Returns the value of thesecond
record component.- Returns:
- the value of the
second
record component
-