Package com.github.tonivade.purefun.core
Record Class Applicable.Map2<F extends Applicable<F,?>,A,B>
java.lang.Object
java.lang.Record
com.github.tonivade.purefun.core.Applicable.Map2<F,A,B>
- Enclosing interface:
Applicable<F extends Applicable<F,?>, A>
public static record Applicable.Map2<F extends Applicable<F,?>,A,B> (Applicable<F extends Applicable<F,?>,? extends A> fa, Applicable<F extends Applicable<F,?>,? extends B> fb)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Applicable<F, ? extends A> The field for thefarecord component.private final Applicable<F, ? extends B> The field for thefbrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMap2(Applicable<F, ? extends A> fa, Applicable<F, ? extends B> fb) Creates an instance of aMap2record class. -
Method Summary
Modifier and TypeMethodDescription<R> Applicable<F, R> final booleanIndicates whether some other object is "equal to" this one.Applicable<F, ? extends A> fa()Returns the value of thefarecord component.Applicable<F, ? extends B> fb()Returns the value of thefbrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
fa
The field for thefarecord component. -
fb
The field for thefbrecord component.
-
-
Constructor Details
-
Map2
Creates an instance of aMap2record class.- Parameters:
fa- the value for thefarecord componentfb- the value for thefbrecord component
-
-
Method Details
-
apply
-
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). -
fa
Returns the value of thefarecord component.- Returns:
- the value of the
farecord component
-
fb
Returns the value of thefbrecord component.- Returns:
- the value of the
fbrecord component
-