Class InvalidSegmentException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.codehaus.mojo.versions.ordering.InvalidSegmentException
All Implemented Interfaces:
Serializable

public class InvalidSegmentException extends Exception
Exception thrown when an invalid Segment is referenced for a particular ArtifactVersion.

The constructor requires a non-null Segment and ArtifactVersion and a non-negative segment count.

See Also:
  • Constructor Details

    • InvalidSegmentException

      public InvalidSegmentException(Segment segment, int segmentCount, org.apache.maven.artifact.versioning.ArtifactVersion version)
      Constructs a new InvalidSegmentException.
      Parameters:
      segment - the invalid Segment; must not be null
      segmentCount - the number of segments in the version; must be non-negative
      version - the ArtifactVersion instance; must not be null
  • Method Details

    • getSegment

      public Segment getSegment()
      Returns the invalid Segment.
      Returns:
      the invalid Segment; never null for a correctly constructed exception
    • getSegmentCount

      public int getSegmentCount()
      Returns the number of segments in the version.
      Returns:
      the segment count (non-negative)
    • getVersion

      public org.apache.maven.artifact.versioning.ArtifactVersion getVersion()
      Returns the ArtifactVersion associated with the exception.
      Returns:
      the ArtifactVersion; never null for a correctly constructed exception