Top Constructors Methods
io.smallrye.common.version

pack-priv final Class MavenVersionScheme

extends AbstractVersionScheme<MavenVersionIterator>
Class Inheritance
Imports
io.smallrye.common.version.AbstractVersionIterator.TokenType

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected int
compare(MavenVersionIterator
the iterator for the first version (must not be null)
i1
,
MavenVersionIterator
the iterator for the second version (must not be null)
i2
)

Implements abstract io.smallrye.common.version.AbstractVersionScheme.compare.

Implements java.util.Comparator.compare.

Compare the current tokens of the two given iterators.

protected int
compareNext(final MavenVersionIterator
the iterator for the first version (must not be null)
i1
,
final MavenVersionIterator
the iterator for the second version (must not be null)
i2
)

Overrides io.smallrye.common.version.AbstractVersionScheme.compareNext.

Compare the next elements of the given iterators.

protected int
compareZero(MavenVersionIterator
the version iterator (must not be null)
i
)

Overrides io.smallrye.common.version.AbstractVersionScheme.compareZero.

Compare the given version iterator against zero.

public MavenVersionIterator
iterate(final String
the version to iterate (must not be null)
version
)

Implements abstract io.smallrye.common.version.AbstractVersionScheme.iterate.

Implements io.smallrye.common.version.VersionScheme.iterate.

Iterate the canonicalized components of the given version according to the rules of this versioning scheme.

Inherited from io.smallrye.common.version.AbstractVersionScheme:
appendCanonicalizedcompare

Constructor Detail

MavenVersionSchemeback to summary
pack-priv MavenVersionScheme()

Method Detail

compareback to summary
protected int compare(MavenVersionIterator i1, MavenVersionIterator i2)

Implements abstract io.smallrye.common.version.AbstractVersionScheme.compare.

Implements java.util.Comparator.compare.

Doc from io.smallrye.common.version.AbstractVersionScheme.compare.

Compare the current tokens of the two given iterators. If the tokens are equal, then this method should recurse to compareNext(I, I) (or equivalent) to compare the next tokens.

Parameters
i1:MavenVersionIterator

the iterator for the first version (must not be null)

i2:MavenVersionIterator

the iterator for the second version (must not be null)

Returns:int

-1, 0, or 1 if the first version is less than, equal to, or greater than the second version

compareNextback to summary
protected int compareNext(final MavenVersionIterator i1, final MavenVersionIterator i2)

Overrides io.smallrye.common.version.AbstractVersionScheme.compareNext.

Doc from io.smallrye.common.version.AbstractVersionScheme.compareNext.

Compare the next elements of the given iterators. If one iterator is at the end of iteration (its iterator reports no next element), the corresponding version is considered to come before the other version. If both iterators are at the end of iteration, the versions are considered equal. Otherwise, compare(I, I) is called to compare the iterators' current tokens.

Parameters
i1:MavenVersionIterator

the iterator for the first version (must not be null)

i2:MavenVersionIterator

the iterator for the second version (must not be null)

Returns:int

-1, 0, or 1 if the first version is less than, equal to, or greater than the second version

compareZeroback to summary
protected int compareZero(MavenVersionIterator i)

Overrides io.smallrye.common.version.AbstractVersionScheme.compareZero.

Doc from io.smallrye.common.version.AbstractVersionScheme.compareZero.

Compare the given version iterator against zero. The default implementation assumes that any non-empty version comes after zero.

Parameters
i:MavenVersionIterator

the version iterator (must not be null)

Returns:int

-1, 0, or 1 if the first version is less than, equal to, or greater than zero

iterateback to summary
public MavenVersionIterator iterate(final String version)

Implements abstract io.smallrye.common.version.AbstractVersionScheme.iterate.

Implements io.smallrye.common.version.VersionScheme.iterate.

Doc from io.smallrye.common.version.VersionScheme.iterate.

Iterate the canonicalized components of the given version according to the rules of this versioning scheme.

Parameters
version:String

the version to iterate (must not be null)

Returns:MavenVersionIterator

the version iterator (not null)