Record Class Sequence.IndexedValue<T>
java.lang.Object
java.lang.Record
cloud.opencode.base.functional.monad.Sequence.IndexedValue<T>
- Type Parameters:
T- value type - 值类型- Record Components:
index- the index - 索引value- the value - 值
Value with its index.
带索引的值。
- Since:
- JDK 25, opencode-base-functional V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionIndexedValue(int index, T value) Creates an instance of aIndexedValuerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
IndexedValue
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
index
-
value
-