Record Class UpgradeResult
java.lang.Object
java.lang.Record
org.apache.maven.cling.invoker.mvnup.goals.UpgradeResult
- Record Components:
- processedPoms- the set of POMs that were processed
- modifiedPoms- the set of POMs that were modified
- errorPoms- the set of POMs that had errors
public record UpgradeResult(Set<Path> processedPoms, Set<Path> modifiedPoms, Set<Path> errorPoms)
extends Record
Result of an upgrade strategy application.
 Uses sets of paths to track which POMs were processed, modified, or had errors,
 avoiding double-counting when multiple strategies affect the same POMs.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic UpgradeResultempty()Creates an empty result (no POMs processed).final booleanIndicates whether some other object is "equal to" this one.intReturns the number of POMs that had errors.Returns the value of theerrorPomsrecord component.static UpgradeResultCreates a failure result with the specified processed POMs and error POMs.final inthashCode()Returns a hash code value for this object.merge(UpgradeResult other) Merges this result with another result, combining the sets of POMs.intReturns the number of POMs modified.Returns the value of themodifiedPomsrecord component.intReturns the number of POMs processed.Returns the value of theprocessedPomsrecord component.booleansuccess()Returns true if no errors occurred.static UpgradeResultCreates a successful result with the specified processed and modified POMs.final StringtoString()Returns a string representation of this record class.intReturns the number of POMs that were processed but not modified and had no errors.
- 
Constructor Details- 
UpgradeResultCreates an instance of aUpgradeResultrecord class.- Parameters:
- processedPoms- the value for the- processedPomsrecord component
- modifiedPoms- the value for the- modifiedPomsrecord component
- errorPoms- the value for the- errorPomsrecord component
 
 
- 
- 
Method Details- 
successCreates a successful result with the specified processed and modified POMs.
- 
failureCreates a failure result with the specified processed POMs and error POMs.
- 
emptyCreates an empty result (no POMs processed).
- 
mergeMerges this result with another result, combining the sets of POMs. This allows proper aggregation of results from multiple strategies without double-counting.
- 
successpublic boolean success()Returns true if no errors occurred.
- 
processedCountpublic int processedCount()Returns the number of POMs processed.
- 
modifiedCountpublic int modifiedCount()Returns the number of POMs modified.
- 
errorCountpublic int errorCount()Returns the number of POMs that had errors.
- 
unmodifiedCountpublic int unmodifiedCount()Returns the number of POMs that were processed but not modified and had no errors.
- 
toString
- 
hashCode
- 
equalsIndicates 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. All components in this record class are compared withObjects::equals(Object,Object).
- 
processedPomsReturns the value of theprocessedPomsrecord component.- Returns:
- the value of the processedPomsrecord component
 
- 
modifiedPomsReturns the value of themodifiedPomsrecord component.- Returns:
- the value of the modifiedPomsrecord component
 
- 
errorPoms
 
-