Record Class FileComparator.LineEntry
java.lang.Object
java.lang.Record
cloud.opencode.base.io.file.FileComparator.LineEntry
- Record Components:
lineNumber- the line number (1-based) | 行号(从1开始)content- the line content | 行内容
- Enclosing class:
FileComparator
A line entry with line number.
带有行号的行条目。
- Since:
- JDK 25, opencode-base-io V1.2.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thelineNumberrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LineEntry
Creates an instance of aLineEntryrecord class.- Parameters:
lineNumber- the value for thelineNumberrecord componentcontent- the value for thecontentrecord component
-
-
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. -
lineNumber
public int lineNumber()Returns the value of thelineNumberrecord component.- Returns:
- the value of the
lineNumberrecord component
-
content
-