Version.Builder
Date: 2017-02-08

com.github.zafarkhaja.semver

## Class Version.Builder

- java.lang.Object
- - com.github.zafarkhaja.semver.Version.Builder

- Enclosing class:
    Version

      public static class Version.Builder
      extends java.lang.Object

  A mutable builder for the immutable `Version` class.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Version.Builder()` Constructs a `Builder` instance.
    `Version.Builder(java.lang.String normal)` Constructs a `Builder` instance with the string representation of the normal version.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Version` | `build()` Builds a `Version` object.
    `Version.Builder` | `setBuildMetadata(java.lang.String build)` Sets the build metadata.
    `Version.Builder` | `setNormalVersion(java.lang.String normal)` Sets the normal version.
    `Version.Builder` | `setPreReleaseVersion(java.lang.String preRelease)` Sets the pre-release version.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Version.Builder

          public Version.Builder()

      Constructs a `Builder` instance.

    - #### Version.Builder

          public Version.Builder(java.lang.String normal)

      Constructs a `Builder` instance with the string representation of the normal version.
      Parameters:
        `normal` - the string representation of the normal version

  - ### Method Detail

    - #### setNormalVersion

          public Version.Builder setNormalVersion(java.lang.String normal)

      Sets the normal version.
      Parameters:
        `normal` - the string representation of the normal version
      Returns:
        this builder instance

    - #### setPreReleaseVersion

          public Version.Builder setPreReleaseVersion(java.lang.String preRelease)

      Sets the pre-release version.
      Parameters:
        `preRelease` - the string representation of the pre-release version
      Returns:
        this builder instance

    - #### setBuildMetadata

          public Version.Builder setBuildMetadata(java.lang.String build)

      Sets the build metadata.
      Parameters:
        `build` - the string representation of the build metadata
      Returns:
        this builder instance

    - #### build

          public Version build()

      Builds a `Version` object.
      Returns:
        a newly built `Version` instance
      Throws:
        `ParseException` - when invalid version string is provided
        `UnexpectedCharacterException` - is a special case of `ParseException`