Class Version

    • Constructor Detail

      • Version

        protected Version()
        Builds the version.
    • Method Detail

      • hashCode

        public abstract int hashCode()
        Returns the hash code for this object
        Overrides:
        hashCode in class Object
        Returns:
        the hash code for this object
      • equals

        public abstract boolean equals​(Object obj)
        Returns true if this version is equal to the given object, false otherwise
        Overrides:
        equals in class Object
        Parameters:
        obj - the object to compare to
        Returns:
        true if this version is equal to the given object, false otherwise
      • getScheme

        public abstract Scheme getScheme()
        Returns the scheme that identifies the implementation
        Returns:
        the scheme that identifies the implementation
      • toString

        public abstract String toString()
        Returns the string representation of this version
        Overrides:
        toString in class Object
        Returns:
        the string representation of this version
      • bump

        public abstract Version bump​(String id)
        Returns a new instance with the number identified by the given value bumped. The supported identifiers depend on the concrete subclass.
        Parameters:
        id - the name of the identifier to bump
        Returns:
        a new instance with the number identified by the given value bumped.
        Throws:
        NullPointerException - if null is passed
        IllegalArgumentException - if the given string is empty, contains illegal characters or does not represent a valid identifier to be bumped