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
ConstructorsConstructorDescriptionChangelogResult(Collection<String> lines, boolean successful, boolean limitReached, int nextVersionIndex, int totalSize) Creates an instance of aChangelogResultrecord 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.booleanReturns the value of thelimitReachedrecord component.lines()Returns the value of thelinesrecord component.intReturns the value of thenextVersionIndexrecord component.booleanReturns the value of thesuccessfulrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalSizerecord component.
-
Constructor Details
-
ChangelogResult
public ChangelogResult(Collection<String> lines, boolean successful, boolean limitReached, int nextVersionIndex, int totalSize) Creates an instance of aChangelogResultrecord class.- Parameters:
lines- the value for thelinesrecord componentsuccessful- the value for thesuccessfulrecord componentlimitReached- the value for thelimitReachedrecord componentnextVersionIndex- the value for thenextVersionIndexrecord componenttotalSize- the value for thetotalSizerecord 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. -
lines
-
successful
public boolean successful()Returns the value of thesuccessfulrecord component.- Returns:
- the value of the
successfulrecord component
-
limitReached
public boolean limitReached()Returns the value of thelimitReachedrecord component.- Returns:
- the value of the
limitReachedrecord component
-
nextVersionIndex
public int nextVersionIndex()Returns the value of thenextVersionIndexrecord component.- Returns:
- the value of the
nextVersionIndexrecord component
-
totalSize
-