small comments

This commit is contained in:
Ilia Kurtov 2017-02-03 19:50:29 +03:00
parent e2d742bbe5
commit 045f4d6504
3 changed files with 9 additions and 40 deletions

View File

@ -1,34 +0,0 @@
/*
* Copyright (c) 2016 Touch Instinct
*
* This file is part of RoboSwag library.
*
* 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 ru.touchin.templates.validation;
import android.support.annotation.Nullable;
/**
* Created by Ilia Kurtov on 24/01/2017.
* TODO: fill
*/
public class ConversionException extends Exception {
public ConversionException(@Nullable final Throwable cause) {
super(cause);
}
}

View File

@ -6,7 +6,7 @@ import java.io.Serializable;
/**
* Created by Ilia Kurtov on 30/01/2017.
* Simple interface that gets one parameter {@link TInput} as input and returns other type {@link TReturn}.
* Simple interface that gets one parameter with {@link TInput} type as input and returns other type {@link TReturn} as a result.
* Interface extends {@link Serializable} to survive after {@link ru.touchin.roboswag.components.navigation.AbstractState} recreation.
* Created as a replace for {@link rx.functions.Func1} because it needed to be {@link Serializable}
* @param <TInput> input type.
@ -15,10 +15,10 @@ import java.io.Serializable;
public interface ValidationFunc<TInput, TReturn> extends Serializable {
/**
*
* @param input
* @return
* @throws Throwable
* The method maps some {@link TInput} type argument into a {@link TReturn} type.
* @param input data;
* @return mapped data into a {@link TReturn} type.
* @throws Throwable for catching conversion errors.
*/
@NonNull
TReturn call(@NonNull final TInput input) throws Throwable;

View File

@ -29,7 +29,10 @@ import ru.touchin.templates.validation.ValidationState;
/**
* Created by Ilia Kurtov on 24/01/2017.
* TODO: fill
* This class holds information about current state of the object - {@link #getWrapperModel()}(that should be connected to some view),
* current error state {@link #getValidationState()}. Also you need to provide a {@link ValidationState} or class that extends it
* as an empty state. Eg, if you need to show some text in your view to show user that this view shouldn't be empty - pass needed state
* to the {@link #getValidationStateWhenEmpty()}
*/
public abstract class Validator<TWrapperModel extends Serializable, TModel extends Serializable>
implements Serializable {