diff --git a/build.gradle b/build.gradle index 506de19..f77c774 100644 --- a/build.gradle +++ b/build.gradle @@ -18,5 +18,5 @@ android { dependencies { provided 'com.android.support:support-annotations:25.4.0' provided 'io.reactivex.rxjava2:rxandroid:2.0.1' - provided 'io.reactivex.rxjava2:rxjava:2.1.1' + provided 'io.reactivex.rxjava2:rxjava:2.1.2' } diff --git a/src/main/java/ru/touchin/roboswag/core/android/support/v7/util/DiffUtil.java b/src/main/java/ru/touchin/roboswag/core/android/support/v7/util/DiffUtil.java index 270c93b..4bdc364 100644 --- a/src/main/java/ru/touchin/roboswag/core/android/support/v7/util/DiffUtil.java +++ b/src/main/java/ru/touchin/roboswag/core/android/support/v7/util/DiffUtil.java @@ -50,13 +50,13 @@ import java.util.List; * and the cost of your comparison methods. Below are some average run times for reference: * (The areSame list is composed of random UUID Strings and the tests are run on Nexus 5X with M) * * *

Due to implementation constraints, the max size of the list can be 2^26. @@ -83,7 +83,6 @@ public class DiffUtil { * Calculates the list of update operations that can covert one list into the other one. * * @param cb The callback that acts as a gateway to the backing list data - * * @return A DiffResult that contains the information about the edit sequence to convert the * old list into the new list. */ @@ -98,9 +97,8 @@ public class DiffUtil { * positions), you can disable move detection which takes O(N^2) time where * N is the number of added, moved, removed items. * - * @param cb The callback that acts as a gateway to the backing list data + * @param cb The callback that acts as a gateway to the backing list data * @param detectMoves True if DiffUtil should try to detect moved items, false otherwise. - * * @return A DiffResult that contains the information about the edit sequence to convert the * old list into the new list. */ @@ -185,7 +183,7 @@ public class DiffUtil { } private static Snake diffPartial(Callback cb, int startOld, int endOld, - int startNew, int endNew, int[] forward, int[] backward, int kOffset) { + int startNew, int endNew, int[] forward, int[] backward, int kOffset) { final int oldSize = endOld - startOld; final int newSize = endNew - startNew; @@ -329,7 +327,6 @@ public class DiffUtil { * * @param oldItemPosition The position of the item in the old list * @param newItemPosition The position of the item in the new list - * * @return A payload object that represents the change between the two items. */ @Nullable @@ -453,14 +450,14 @@ public class DiffUtil { private final boolean mDetectMoves; /** - * @param callback The callback that was used to calculate the diff - * @param snakes The list of Myers' snakes + * @param callback The callback that was used to calculate the diff + * @param snakes The list of Myers' snakes * @param oldItemStatuses An int[] that can be re-purposed to keep metadata * @param newItemStatuses An int[] that can be re-purposed to keep metadata - * @param detectMoves True if this DiffResult will try to detect moved items + * @param detectMoves True if this DiffResult will try to detect moved items */ DiffResult(Callback callback, List snakes, int[] oldItemStatuses, - int[] newItemStatuses, boolean detectMoves) { + int[] newItemStatuses, boolean detectMoves) { mSnakes = snakes; mOldItemStatuses = oldItemStatuses; mNewItemStatuses = newItemStatuses; @@ -556,15 +553,14 @@ public class DiffUtil { * Finds a matching item that is before the given coordinates in the matrix * (before : left and above). * - * @param x The x position in the matrix (position in the old list) - * @param y The y position in the matrix (position in the new list) + * @param x The x position in the matrix (position in the old list) + * @param y The y position in the matrix (position in the new list) * @param snakeIndex The current snake index - * @param removal True if we are looking for a removal, false otherwise - * + * @param removal True if we are looking for a removal, false otherwise * @return True if such item is found. */ private boolean findMatchingItem(final int x, final int y, final int snakeIndex, - final boolean removal) { + final boolean removal) { final int myItemPos; int curX; int curY; @@ -664,7 +660,7 @@ public class DiffUtil { } private static PostponedUpdate removePostponedUpdate(List updates, - int pos, boolean removal) { + int pos, boolean removal) { for (int i = updates.size() - 1; i >= 0; i--) { final PostponedUpdate update = updates.get(i); if (update.posInOwnerList == pos && update.removal == removal) { @@ -680,7 +676,7 @@ public class DiffUtil { } private void dispatchAdditions(List postponedUpdates, - ListUpdateCallback updateCallback, int start, int count, int globalIndex) { + ListUpdateCallback updateCallback, int start, int count, int globalIndex) { if (!mDetectMoves) { updateCallback.onInserted(start, count); return; @@ -720,7 +716,7 @@ public class DiffUtil { } private void dispatchRemovals(List postponedUpdates, - ListUpdateCallback updateCallback, int start, int count, int globalIndex) { + ListUpdateCallback updateCallback, int start, int count, int globalIndex) { if (!mDetectMoves) { updateCallback.onRemoved(start, count); return; diff --git a/src/main/java/ru/touchin/roboswag/core/observables/collections/ObservableCollection.java b/src/main/java/ru/touchin/roboswag/core/observables/collections/ObservableCollection.java index 9f6e855..4001596 100644 --- a/src/main/java/ru/touchin/roboswag/core/observables/collections/ObservableCollection.java +++ b/src/main/java/ru/touchin/roboswag/core/observables/collections/ObservableCollection.java @@ -98,8 +98,8 @@ public abstract class ObservableCollection { * Method to notify that collection have changed. * * @param insertedItems Collection of inserted items; - * @param removedItems Collection of removed items; - * @param changes Changes of collection. + * @param removedItems Collection of removed items; + * @param changes Changes of collection. */ protected void notifyAboutChanges(@NonNull final List insertedItems, @NonNull final List removedItems, diff --git a/src/main/java/ru/touchin/roboswag/core/observables/collections/ObservableList.java b/src/main/java/ru/touchin/roboswag/core/observables/collections/ObservableList.java index 2c08c31..6b979bf 100644 --- a/src/main/java/ru/touchin/roboswag/core/observables/collections/ObservableList.java +++ b/src/main/java/ru/touchin/roboswag/core/observables/collections/ObservableList.java @@ -246,8 +246,8 @@ public class ObservableList extends ObservableCollection implement /** * Enable diff utils algorithm in collection changes. * - * @param detectMoves The flag that determines whether the {@link Change.Moved} changes will be generated or not; - * @param sameItemsPredicate Predicate for the determination of the same elements; + * @param detectMoves The flag that determines whether the {@link Change.Moved} changes will be generated or not; + * @param sameItemsPredicate Predicate for the determination of the same elements; * @param changePayloadProducer Function that calculate change payload when items the same but contents are different. */ public void enableDiffUtils(final boolean detectMoves, diff --git a/src/main/java/ru/touchin/roboswag/core/observables/storable/Converter.java b/src/main/java/ru/touchin/roboswag/core/observables/storable/Converter.java index 5cd1c5f..5991932 100644 --- a/src/main/java/ru/touchin/roboswag/core/observables/storable/Converter.java +++ b/src/main/java/ru/touchin/roboswag/core/observables/storable/Converter.java @@ -38,7 +38,7 @@ public interface Converter { * * @param objectType Type of object; * @param storeObjectType Type of store object allowed to store; - * @param object Object to be converted to store object; + * @param object Object to be converted to store object; * @return Object that is allowed to store into specific {@link Store}; * @throws ConversionException Exception during conversion. Usually it indicates illegal state. */ @@ -51,7 +51,7 @@ public interface Converter { * * @param objectType Type of object; * @param storeObjectType Type of store object allowed to store; - * @param storeObject Object from specific {@link Store}; + * @param storeObject Object from specific {@link Store}; * @return Object converted from store object; * @throws ConversionException Exception during conversion. Usually it indicates illegal state. */ diff --git a/src/main/java/ru/touchin/roboswag/core/utils/pairs/NonNullPair.java b/src/main/java/ru/touchin/roboswag/core/utils/pairs/NonNullPair.java index ee78bb7..789740b 100644 --- a/src/main/java/ru/touchin/roboswag/core/utils/pairs/NonNullPair.java +++ b/src/main/java/ru/touchin/roboswag/core/utils/pairs/NonNullPair.java @@ -32,7 +32,7 @@ import ru.touchin.roboswag.core.utils.ObjectUtils; * Both arguments are not null. * Note that if you want to save this pair in state, you need make TFirst and TSecond Serializable too. * - * @param type of the first nonnull argument. + * @param type of the first nonnull argument. * @param type of the second nonnull argument. */ public class NonNullPair implements Serializable {