Class ImmutableServiceWeights


  • @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableServiceWeights
    extends ServiceWeights
    Immutable implementation of ServiceWeights.

    Use the builder to create immutable instances: ImmutableServiceWeights.builder().

    • Method Detail

      • getPassing

        public int getPassing()
        Specified by:
        getPassing in class ServiceWeights
        Returns:
        The value of the passing attribute
      • getWarning

        public int getWarning()
        Specified by:
        getWarning in class ServiceWeights
        Returns:
        The value of the warning attribute
      • withPassing

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

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

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

        public int hashCode()
        Computes a hash code from attributes: passing, warning.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableServiceWeights copyOf​(ServiceWeights instance)
        Creates an immutable copy of a ServiceWeights 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 ServiceWeights instance