Package org.codehaus.mojo.versions.utils
Class SegmentUtils
java.lang.Object
org.codehaus.mojo.versions.utils.SegmentUtils
Utility class for manipulating with
Segment objects-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondetermineUnchangedSegment(boolean allowMajorUpdates, boolean allowMinorUpdates, boolean allowIncrementalUpdates, org.apache.maven.plugin.logging.Log log) Based on the passed flags, determines which segment which is not to be changed.
-
Constructor Details
-
SegmentUtils
public SegmentUtils()
-
-
Method Details
-
determineUnchangedSegment
public static Optional<Segment> determineUnchangedSegment(boolean allowMajorUpdates, boolean allowMinorUpdates, boolean allowIncrementalUpdates, org.apache.maven.plugin.logging.Log log) Based on the passed flags, determines which segment which is not to be changed.
Also, logs the enriched values of the
allowMajorUpdates,allowMinorUpdates, andallowIncrementalUpdatesoptions so thatallowMinorUpdatesequal tofalseimplies thatallowMajorUpdatesis alsofalse.Also,
allowIncrementalUpdatesequal tofalseimplies that bothallowMajorUpdatesandallowMinorUpdatesare alsofalse.Effective values for update options allowMajorUpdates allowMinorUpdates allowIncrementalUpdates true true true true true true - Parameters:
allowMajorUpdates- whether all updates should be allowedallowMinorUpdates- if major updates are disallowed, minor, incremental updates should be allowedallowIncrementalUpdates- if major and minor updates are disallowed, incremental updates are allowedlog- If not null, the Log object to log the selected scope- Returns:
- Returns the segment (0-based) that is unchangeable. If any segment can change, returns -1.
-