Record Class ValueDifference.ValueDifferenceImpl<V>
java.lang.Object
java.lang.Record
cloud.opencode.base.collections.ValueDifference.ValueDifferenceImpl<V>
- Type Parameters:
V- value type | 值类型
- All Implemented Interfaces:
ValueDifference<V>
- Enclosing interface:
ValueDifference<V>
public static record ValueDifference.ValueDifferenceImpl<V>(V leftValue, V rightValue)
extends Record
implements ValueDifference<V>
Default implementation of ValueDifference.
ValueDifference 的默认实现。
- Since:
- JDK 25, opencode-base-collections V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Nested Class Summary
Nested classes/interfaces inherited from interface ValueDifference
ValueDifference.ValueDifferenceImpl<V> -
Constructor Summary
ConstructorsConstructorDescriptionValueDifferenceImpl(V leftValue, V rightValue) Creates an instance of aValueDifferenceImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.Returns the value of theleftValuerecord component.Returns the value of therightValuerecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
ValueDifferenceImpl
-
-
Method Details
-
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). -
hashCode
-
toString
-
leftValue
Returns the value of theleftValuerecord component.- Specified by:
leftValuein interfaceValueDifference<V>- Returns:
- the value of the
leftValuerecord component
-
rightValue
Returns the value of therightValuerecord component.- Specified by:
rightValuein interfaceValueDifference<V>- Returns:
- the value of the
rightValuerecord component
-