From dc2b9ef3fff2b000a80211bfe65393ccc7233777 Mon Sep 17 00:00:00 2001 From: Arseniy Borisov Date: Mon, 4 Sep 2017 17:36:34 +0300 Subject: [PATCH] idea formatter (#84) --- .../java/ru/touchin/templates/calendar/CalendarUtils.java | 4 ++-- .../templates/retrofit/JsonResponseBodyConverter.java | 2 +- .../ru/touchin/templates/validation/ValidationState.java | 2 ++ .../ru/touchin/templates/validation/ViewWithError.java | 1 + .../BooleanValidationController.java | 1 + .../EditTextValidationController.java | 3 +-- .../validationcontrollers/SimpleValidationController.java | 4 +++- .../validationcontrollers/ValidationController.java | 8 +++++--- .../validation/validators/EditTextValidator.java | 8 +++++++- .../validation/validators/SameTypeValidator.java | 5 ++++- .../templates/validation/validators/Validator.java | 7 ++++++- 11 files changed, 33 insertions(+), 12 deletions(-) diff --git a/src/main/java/ru/touchin/templates/calendar/CalendarUtils.java b/src/main/java/ru/touchin/templates/calendar/CalendarUtils.java index a4e9327..d9dfb5f 100644 --- a/src/main/java/ru/touchin/templates/calendar/CalendarUtils.java +++ b/src/main/java/ru/touchin/templates/calendar/CalendarUtils.java @@ -59,7 +59,7 @@ public final class CalendarUtils { * @param calendarItems List of {@link CalendarItem} where need to find specific element; * @param position Position of adapter; * @return Position of Header that respond to requested position. - * Returns null if Header or related CalendarItem was not found for specified position. + * Returns null if Header or related CalendarItem was not found for specified position. */ @Nullable public static Integer findPositionOfSelectedMonth(@NonNull final List calendarItems, final long position) { @@ -76,7 +76,7 @@ public final class CalendarUtils { * @param calendarItems List of {@link CalendarItem} where need to find specific element; * @param date Requested date in milliseconds. * @return Position of Calendar cell that that has specific date. - * Returns null if CalendarItem was not found for specified position. + * Returns null if CalendarItem was not found for specified position. */ @Nullable public static Integer findPositionByDate(@NonNull final List calendarItems, final long date) { diff --git a/src/main/java/ru/touchin/templates/retrofit/JsonResponseBodyConverter.java b/src/main/java/ru/touchin/templates/retrofit/JsonResponseBodyConverter.java index cceb06b..614c8e2 100644 --- a/src/main/java/ru/touchin/templates/retrofit/JsonResponseBodyConverter.java +++ b/src/main/java/ru/touchin/templates/retrofit/JsonResponseBodyConverter.java @@ -70,7 +70,7 @@ public abstract class JsonResponseBodyConverter implements Converter /** * If we don't want to show error when focus is lost. * - * @param showErrorOnFocusOut show an error or don't show an error. - * + * @param showErrorOnFocusOut show an error or don't show an error. */ public void setShowErrorOnFocusOut(final boolean showErrorOnFocusOut) { this.showErrorOnFocusOut = showErrorOnFocusOut; diff --git a/src/main/java/ru/touchin/templates/validation/validationcontrollers/SimpleValidationController.java b/src/main/java/ru/touchin/templates/validation/validationcontrollers/SimpleValidationController.java index d8e9da9..c1f5800 100644 --- a/src/main/java/ru/touchin/templates/validation/validationcontrollers/SimpleValidationController.java +++ b/src/main/java/ru/touchin/templates/validation/validationcontrollers/SimpleValidationController.java @@ -12,7 +12,8 @@ import rx.Observable; * Created by Ilia Kurtov on 24/01/2017. * {@link ValidationController} for models that have the same modal as wrapper model. You can use it when you simply need to be sure * that user have selected some item and it is not null. - * @param type of the model. + * + * @param type of the model. * @param corresponding {@link Validator} */ public class SimpleValidationController> @@ -24,6 +25,7 @@ public class SimpleValidationController extends Val * This flag needed to force showing errors. You don't want to show final error when you start to enter data in some field at first time. * But if user leaves this view and final check not passed - you need to force to show an error till user not enters correct data and leaves * the view. + * * @return {@link NonNullChangeable} with current state of the flag - do we need to show errors from final checks while user types. */ @NonNull @@ -60,6 +61,7 @@ public abstract class EditTextValidator extends Val /** * Use this method to get or set final check. + * * @return final check. */ @NonNull @@ -69,6 +71,7 @@ public abstract class EditTextValidator extends Val /** * Use this method to get or set primary check. + * * @return primary check. */ @NonNull @@ -119,6 +122,7 @@ public abstract class EditTextValidator extends Val /** * Validates text with primary check. + * * @param text - input text. * @return {@link Observable} with the result of the primary check. */ @@ -129,6 +133,7 @@ public abstract class EditTextValidator extends Val /** * Validates text with final check. + * * @param text - input text. * @return {@link Observable} with the result of the final check. */ @@ -140,9 +145,10 @@ public abstract class EditTextValidator extends Val /** * Validates text with primary and final check consequentially and returns {@link Observable} with {@link HalfNullablePair} of final state * and resulting model. + * * @param text - input text. * @return pair with final {@link ValidationState} that is always not null and a model that we get after converting the text. - * Model can be null if validation fails on primary or final checks. + * Model can be null if validation fails on primary or final checks. */ @NonNull @Override diff --git a/src/main/java/ru/touchin/templates/validation/validators/SameTypeValidator.java b/src/main/java/ru/touchin/templates/validation/validators/SameTypeValidator.java index ae2f08b..515f0d3 100644 --- a/src/main/java/ru/touchin/templates/validation/validators/SameTypeValidator.java +++ b/src/main/java/ru/touchin/templates/validation/validators/SameTypeValidator.java @@ -12,12 +12,14 @@ import rx.Observable; /** * Created by Ilia Kurtov on 24/01/2017. * Class that simplifies work with {@link Validator}'s that have the same wrapper model and model type. + * * @param model that should be bounded with a view. */ public class SameTypeValidator extends Validator { /** * Simply returns the same model without any converting. + * * @param wrapperModel input model. * @return the same model as input parameter. * @throws Throwable - in this case no throwable would be thrown. @@ -31,9 +33,10 @@ public class SameTypeValidator extends Validator> fullValidateAndGetModel(@NonNull final TWrapperModel wrapperModel);