Record Class ChangelogResult
java.lang.Object
java.lang.Record
com.palmergames.bukkit.towny.object.ChangelogResult
- Record Components:
lines
- The changelog lines, will be empty if the changelog could not be read successfully.successful
- Whether the changelog file was read successfully, currently only false if the last version could not be found.limitReached
- Whether the specified line limit was reached during reading.nextVersionIndex
- The line index of where the first version changelog for the first version after the last version starts.totalSize
- The total line count of the changelog.
public record ChangelogResult(Collection<String> lines, boolean successful, boolean limitReached, int nextVersionIndex, int totalSize)
extends Record
Represents a read changelog from a
ChangelogReader
.-
Constructor Summary
ConstructorDescriptionChangelogResult
(Collection<String> lines, boolean successful, boolean limitReached, int nextVersionIndex, int totalSize) Creates an instance of aChangelogResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of thelimitReached
record component.lines()
Returns the value of thelines
record component.int
Returns the value of thenextVersionIndex
record component.boolean
Returns the value of thesuccessful
record component.final String
toString()
Returns a string representation of this record class.int
Returns the value of thetotalSize
record component.
-
Constructor Details
-
ChangelogResult
public ChangelogResult(Collection<String> lines, boolean successful, boolean limitReached, int nextVersionIndex, int totalSize) Creates an instance of aChangelogResult
record class.- Parameters:
lines
- the value for thelines
record componentsuccessful
- the value for thesuccessful
record componentlimitReached
- the value for thelimitReached
record componentnextVersionIndex
- the value for thenextVersionIndex
record componenttotalSize
- the value for thetotalSize
record component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
lines
Returns the value of thelines
record component.- Returns:
- the value of the
lines
record component
-
successful
public boolean successful()Returns the value of thesuccessful
record component.- Returns:
- the value of the
successful
record component
-
limitReached
public boolean limitReached()Returns the value of thelimitReached
record component.- Returns:
- the value of the
limitReached
record component
-
nextVersionIndex
public int nextVersionIndex()Returns the value of thenextVersionIndex
record component.- Returns:
- the value of the
nextVersionIndex
record component
-
totalSize
public int totalSize()Returns the value of thetotalSize
record component.- Returns:
- the value of the
totalSize
record component
-