Record Class BeanPath.IndexSegment
java.lang.Object
java.lang.Record
cloud.opencode.base.core.bean.BeanPath.IndexSegment
- Record Components:
value- the raw segment text | 原始段文本index- the array/list index | 数组/列表索引
- All Implemented Interfaces:
BeanPath.PathSegment
- Enclosing class:
BeanPath
public static record BeanPath.IndexSegment(String value, int index)
extends Record
implements BeanPath.PathSegment
Index segment | 索引段
- Since:
- JDK 25, opencode-base-core V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionIndexSegment(String value, int index) Creates an instance of aIndexSegmentrecord 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
-
IndexSegment
-
-
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. -
value
Returns the value of thevaluerecord component.- Specified by:
valuein interfaceBeanPath.PathSegment- Returns:
- the value of the
valuerecord component
-
index
-