de.caff.version

## Class SemVer.Prerelease

- java.lang.Object
- - de.caff.version.SemVer.Prerelease

- All Implemented Interfaces:
    Countable<SemVer.Prerelease.Identifier>, Indexable<SemVer.Prerelease.Identifier>, Sizeable, java.lang.Comparable<SemVer.Prerelease>, java.lang.Iterable<SemVer.Prerelease.Identifier>
  Enclosing class:
    SemVer

      public static final class SemVer.Prerelease
      extends java.lang.Object
      implements Indexable<SemVer.Prerelease.Identifier>, java.lang.Comparable<SemVer.Prerelease>

  Prerelease indicator.

  This is the prerelease part of a semantic version.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SemVer.Prerelease.AlphanumericIdentifier` Alphanumeric identifier.
    `static interface` | `SemVer.Prerelease.Identifier` Identifier.
    `static class` | `SemVer.Prerelease.NumericIdentifier` Numeric identifier.

    - ### Nested classes/interfaces inherited from interface de.caff.generics.Indexable

      `Indexable.Base<TT>, Indexable.IndexableSpliterator<TElem>, Indexable.ListView<T>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static SemVer.Prerelease` | `ALPHA` Alpha prerelease.
    `static SemVer.Prerelease` | `BETA` Beta prerelease.
    `static SemVer.Prerelease` | `RC` Release candidate prerelease.

    - ### Fields inherited from interface de.caff.generics.Indexable

      `EMPTY, EMPTY_INDEXABLE_STRING`

    - ### Fields inherited from interface de.caff.generics.Sizeable

      `NULL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Prerelease(SemVer.Prerelease.Identifier ident)` Constructor for a simple one-identifier prerelease.
    `Prerelease(SemVer.Prerelease.Identifier firstIdent, SemVer.Prerelease.Identifier... moreIdents)` Constructor for a multiple-identifier prerelease.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(SemVer.Prerelease o)`
    `boolean` | `equals(java.lang.Object o)`
    `SemVer.Prerelease.Identifier` | `get(int index)` Get the identifier in the given position.
    `int` | `hashCode()`
    `static SemVer.Prerelease` | `parse(java.lang.String prereleaseString)` Create a prerelase from its string representation.
    `int` | `size()` Get the number of identifiers in this prerelease definition.
    `java.lang.String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface de.caff.generics.Indexable

      `addToArray, addToArray, addToCollection, asBase, asCollection, asList, binarySearch, checkIndex, combine, compare, downCast, emptyIndexable, equal, findAll, findAllX, findFirst, findFirst, findFirst, findFirstX, findLast, findLast, findLast, findNext, findNext, findNext, findNextX, findPrevious, findPrevious, findPrevious, first, firstMatch, firstMatch, firstMatchX, forEachEntry, forEachEntryFragile, fromArray, fromCollection, fromCollection, fromCountable, fromCountable, fromEnumeration, fromEnumeration, fromIterable, fromIterable, fromIterable, fromIterable, fromIterator, fromList, fromOptional, frozenSpliterator, getMod, gyt, hash, headSet, indexedView, indexes, init, initByIndex, initFragile, intIndexes, isEmpty, isOrdered, isStrictlyOrdered, iterator, iterator, last, listIterator, mapArray, optional, ordered, reverse, rotated, singleton, spliterator, subSet, sybSet, tailSet, toString, view, view, viewArray, viewArray, viewAsBooleanIndexable, viewAsByteIndexable, viewAsCharIndexable, viewAsDict, viewAsDoubleIndexable, viewAsFloatIndexable, viewAsIntIndexable, viewAsLongIndexable, viewAsShortIndexable, viewByIndex, viewFragile, viewList, viewList, viewListN, viewListN, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, withAppendedItem, withCachedHash, withExchangedItemAt, withInsertedItemAt, withPrependedItem, withRemovedItemAt, withSwappedItemsAt`

    - ### Methods inherited from interface de.caff.generics.Countable

      `addAllTo, combined, combined, containsEq, containsRef, downCast, empty, equal, equals, filtered, filteredToIndexable, filterToCountable, firstOrNull, foldLeft, forEachFragile, freeze, frozen, frozen, getAny, groupingBy, groupingBy, hasAll, hasAny, isSorted, isStrictlySorted, lastOrNull, mappingBy, mappingBy, optFirst, optLast, orderedCombination, parellelStream, sorted, stream, toArray, toArray, toList, toString, uniform, viewCollection, viewCollection, viewCollectionN, viewCollectionN`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

- - ### Field Detail

    - #### ALPHA

          public static final SemVer.Prerelease ALPHA

      Alpha prerelease.

    - #### BETA

          public static final SemVer.Prerelease BETA

      Beta prerelease.

    - #### RC

          public static final SemVer.Prerelease RC

      Release candidate prerelease.

  - ### Constructor Detail

    - #### Prerelease

          public Prerelease(@NotNull
                            SemVer.Prerelease.Identifier ident)

      Constructor for a simple one-identifier prerelease.
      Parameters:
        `ident` - identifier

    - #### Prerelease

          public Prerelease(@NotNull
                            SemVer.Prerelease.Identifier firstIdent,
                            @NotNull
                            SemVer.Prerelease.Identifier... moreIdents)

      Constructor for a multiple-identifier prerelease.
      Parameters:
        `firstIdent` - first identifier
        `moreIdents` - second identifier

  - ### Method Detail

    - #### get

          public SemVer.Prerelease.Identifier get(int index)

      Get the identifier in the given position.
      Specified by:
        `get` in interface `Indexable<SemVer.Prerelease.Identifier>`
      Parameters:
        `index` - index between `0` and `size() - 1`, from most significant to least
      Returns:
        identifier at the given position

    - #### size

          public int size()

      Get the number of identifiers in this prerelease definition.
      Specified by:
        `size` in interface `Sizeable`
      Returns:
        number of identifiers, at least 1

    - #### parse

          @Nullable
          public static SemVer.Prerelease parse(@NotNull
                                                          java.lang.String prereleaseString)

      Create a prerelase from its string representation.
      Parameters:
        `prereleaseString` - prerelease string
      Returns:
        parese prerelease, or `null` if `prereleaseString` is not valid

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### compareTo

          public int compareTo(@NotNull
                               SemVer.Prerelease o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable<SemVer.Prerelease>`

    - #### toString

          @NotNull
          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`