Class CVersionStandard

    • Method Detail

      • withMajor

        public final CVersionStandard withMajor​(int value)
        Copy the current immutable object by setting a value for the major attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for major
        Returns:
        A modified copy of the this object
      • withMinor

        public final CVersionStandard withMinor​(int value)
        Copy the current immutable object by setting a value for the minor attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for minor
        Returns:
        A modified copy of the this object
      • withPatch

        public final CVersionStandard withPatch​(int value)
        Copy the current immutable object by setting a value for the patch attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for patch
        Returns:
        A modified copy of the this object
      • withQualifier

        public final CVersionStandard withQualifier​(String value)
        Copy the current immutable object by setting a value for the qualifier attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for qualifier
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(Object another)
        This instance is equal to all instances of CVersionStandard that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: major, minor, patch, qualifier.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value CVersionStandard with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • of

        public static CVersionStandard of​(int major,
                                          int minor,
                                          int patch,
                                          String qualifier)
        Construct a new immutable CVersionStandard instance.
        Parameters:
        major - The value for the major attribute
        minor - The value for the minor attribute
        patch - The value for the patch attribute
        qualifier - The value for the qualifier attribute
        Returns:
        An immutable CVersionStandard instance
      • copyOf

        public static CVersionStandard copyOf​(CVersionStandardType instance)
        Creates an immutable copy of a CVersionStandardType value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable CVersionStandard instance