/*
 * Copyright 2014-present Facebook, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.facebook.litho;

import com.facebook.litho.annotations.ShouldUpdate;
import javax.annotation.Nullable;

/**
 * Represents a diff between two values T. It should be used when defining the
 * {@link ShouldUpdate} callback in a ComponentSpec. a Diff
 * holds the previous and next value for a specific Prop for a ComponentSpec
 */
public final class Diff<T> {

  final @Nullable T mPrevious;
  @Nullable T mNext;

  public Diff(@Nullable T previous, @Nullable T next) {
    mPrevious = previous;
    mNext = next;
  }

  @Nullable
  public T getPrevious() {
    return mPrevious;
  }

  @Nullable
  public T getNext() {
    return mNext;
  }

  public void setNext(@Nullable T next) {
    mNext = next;
  }

  @Override
  public String toString() {
    return "Diff{" + "mPrevious=" + mPrevious + ", mNext=" + mNext + '}';
  }
}

@@ -665,25 +665,172 @@
 tations.
-ShouldUpd
+OnCreateTransition;%0Aimport com.facebook.litho.annotations.Prop;%0Aimport com.facebook.litho.annotations.ShouldUpdate;%0Aimport com.facebook.litho.annotations.St
 ate;%0Aimp
@@ -901,17 +901,25 @@
  two
+ %7B@code T%7D
  values
- T
 . It
@@ -955,18 +955,18 @@
  the
-%0A *
  %7B@link
+%0A *
  Sho
@@ -1007,19 +1007,112 @@
 Spec
-.
  a
+nd may be used in %7B@link OnCreateTransition%7D to define%0A * animations based on incoming changes. A
  Diff
-%0A *
  hol
@@ -1160,13 +1160,41 @@
 ific
- Prop
+%0A * %7B@link Prop%7D or %7B@link State%7D
  for
@@ -1209,16 +1209,17 @@
 nentSpec
+.
 %0A */%0Apub
@@ -1247,16 +1247,24 @@
 T%3E %7B%0A%0A  
+private 
 final @N
@@ -1286,16 +1286,24 @@
 ious;%0A  
+private 
 @Nullabl

Update javadocs for Diff