Class ImmutableDiffEntry

    • Method Detail

      • withKey

        public final ImmutableDiffEntry withKey​(ContentKey value)
        Copy the current immutable object by setting a value for the key attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for key
        Returns:
        A modified copy of the this object
      • withFrom

        public final ImmutableDiffEntry withFrom​(@Nullable
                                                 Content value)
        Copy the current immutable object by setting a value for the from attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for from (can be null)
        Returns:
        A modified copy of the this object
      • withTo

        public final ImmutableDiffEntry withTo​(@Nullable
                                               Content value)
        Copy the current immutable object by setting a value for the to attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for to (can be null)
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableDiffEntry 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: key, from, to.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableDiffEntry copyOf​(DiffResponse.DiffEntry instance)
        Creates an immutable copy of a DiffResponse.DiffEntry 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 DiffEntry instance
      • builder

        public static ImmutableDiffEntry.Builder builder()
        Creates a builder for ImmutableDiffEntry.
         ImmutableDiffEntry.builder()
            .key(org.projectnessie.model.ContentKey) // required key
            .from(org.projectnessie.model.Content | null) // nullable from
            .to(org.projectnessie.model.Content | null) // nullable to
            .build();
         
        Returns:
        A new ImmutableDiffEntry builder