Package io.ultreia.java4all.util
Class Version.VersionBuilder
- java.lang.Object
-
- io.ultreia.java4all.util.Version.VersionBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Comparable<?>>componentsList of components of the version.protected List<String>componentSeparatorsList of components separators explicitly defined (used asVersion.componentSeparators.protected CharacterjoinSeparatorThe character to join component in a string representation.protected Set<String>preReleaseClassifiersClassifiers known as pre-release classifiers.protected booleansnapshotIs the version a snapshot ?protected Set<Character>splitSeparatorsSet of characters used to split components.protected StringversionThe string representation of the version.
-
Constructor Summary
Constructors Constructor Description VersionBuilder()
-
Method Summary
-
-
-
Field Detail
-
preReleaseClassifiers
protected Set<String> preReleaseClassifiers
Classifiers known as pre-release classifiers.
-
splitSeparators
protected Set<Character> splitSeparators
Set of characters used to split components.
-
joinSeparator
protected Character joinSeparator
The character to join component in a string representation.
-
version
protected String version
The string representation of the version.
-
components
protected List<Comparable<?>> components
List of components of the version.
-
componentSeparators
protected List<String> componentSeparators
List of components separators explicitly defined (used asVersion.componentSeparators.
-
snapshot
protected boolean snapshot
Is the version a snapshot ? In a such case, theversionends with-SNAPSHOT.
-
-
Method Detail
-
setVersion
public Version.VersionBuilder setVersion(String version)
-
setComponents
public Version.VersionBuilder setComponents(List<Comparable<?>> components)
-
setComponent
public Version.VersionBuilder setComponent(int level, Comparable<?> value)
-
addComponent
public Version.VersionBuilder addComponent(Comparable<?> value)
-
addComponent
public Version.VersionBuilder addComponent(Comparable<?> value, char componentSeparator)
-
removeComponent
public Version.VersionBuilder removeComponent(int level)
-
setComponentSeparators
public Version.VersionBuilder setComponentSeparators(List<String> componentSeparators)
-
setComponentSeparator
public Version.VersionBuilder setComponentSeparator(int level, char value)
-
setSnapshot
public Version.VersionBuilder setSnapshot(boolean snapshot)
-
setSplitSeparators
public Version.VersionBuilder setSplitSeparators(Set<Character> splitSeparators)
-
setJoinSeparator
public Version.VersionBuilder setJoinSeparator(Character joinSeparator)
-
setPreReleaseClassifiers
public Version.VersionBuilder setPreReleaseClassifiers(Set<String> preReleaseClassifiers)
-
fromStringRepresentation
protected boolean fromStringRepresentation()
-
fromComponents
protected boolean fromComponents()
-
build
public Version build()
-
toVersionComponent
protected Version.VersionComponent<?,?> toVersionComponent(boolean numberState, String currentComponentStr)
-
-