// Path: gmlrva-lib/src/main/java/pt/simdea/gmlrva/lib/decoration/decorators/SimpleDividerItemDecoration.java
// public class SimpleDividerItemDecoration extends GenericItemDecoration<SimpleDividerItemDecorationSpec> {
// 
//     @NonNull
//     private final DecoratorDrawOverManager mDrawOverManager = new DecoratorDrawOverManager();
// 
//     @IntRange(from = 0)
//     private int mTopSpacing;
//     @IntRange(from = 0)
//     private int mBottomSpacing;
//     @IntRange(from = 0)
//     private int mStartSpacing;
//     @IntRange(from = 0)
//     private int mEndSpacing;
//     @IntRange(from = 0, to = 5)
//     private int mDividerPosition;
// 
//     @Nullable
//     private Drawable mDivider;
//     @Nullable
//     private Paint mDrawnDivider;
// 
//     /**
//      * Instantiates a new SimpleDividerItemDecoration.
//      * @param configurationSpec a valid {@link ItemDecorationSpec} containing this item decoration specification.
//      */
//     public SimpleDividerItemDecoration(@NonNull final SimpleDividerItemDecorationSpec configurationSpec) {
//         super(configurationSpec);
//     }
// 
//     /** {@inheritDoc} */
//     @Override
//     public void getItemOffsets(@NonNull final Rect outRect, @NonNull final View view,
//                                @NonNull final RecyclerView parent, @NonNull final RecyclerView.State state) {
//         outRect.top = mTopSpacing;
//         outRect.bottom = mBottomSpacing;
//         outRect.left = mStartSpacing;
//         outRect.right = mEndSpacing;
//     }
// 
//     /** {@inheritDoc} */
//     @Override
//     public void onDrawOver(@NonNull final Canvas canvas, @NonNull final RecyclerView parent,
//                            @NonNull final RecyclerView.State state) {
//         if (mDivider != null) {
//             mDrawOverManager.applyDrawableDivider(canvas, parent, mDivider, mDividerPosition);
//         } else if (mDrawnDivider != null) {
//             mDrawOverManager.applyDrawnDivider(canvas, parent, state, mDrawnDivider, mDividerPosition);
//         }
//     }
// 
//     /** {@inheritDoc} */
//     @Override
//     protected void applySpec(@NonNull final SimpleDividerItemDecorationSpec configurationSpec) {
//         /* Get Spacing Rules */
//         mTopSpacing = configurationSpec.getTopSpacing();
//         mBottomSpacing = configurationSpec.getBottomSpacing();
//         mStartSpacing = configurationSpec.getStartSpacing();
//         mEndSpacing = configurationSpec.getEndSpacing();
// 
//         /* Get Divider Rules */
//         mDivider = configurationSpec.getDivider();
//         mDividerPosition = configurationSpec.getDividerPosition();
//         mDrawnDivider = configurationSpec.getDrawnDivider();
//     }
// 
// }
// 
// Path: gmlrva-lib/src/main/java/pt/simdea/gmlrva/lib/utilities/GMLRVAConstants.java
// @SuppressWarnings("WeakerAccess")
// public final class GMLRVAConstants {
// 
//     /** Exception Messages */
//     public static final String ASSERTION_ERROR = "Instantiating utility class.";
//     public static final String UNSUPPORTED_ERROR = "Unsupported operation.";
// 
//     /**
//      * Instantiates a new GMLRVAConstants.
//      * Private to prevent instantiation.
//      * @throws AssertionError if this constructor is ever called. Utility classes should not be instantiated.
//      */
//     private GMLRVAConstants() {
//         throw new AssertionError(ASSERTION_ERROR); // Throw an exception if this *is* ever called
//     }
// 
// }


import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import lombok.NoArgsConstructor;
import pt.simdea.gmlrva.lib.decoration.decorators.SimpleDividerItemDecoration;
import pt.simdea.gmlrva.lib.utilities.GMLRVAConstants;
     * @param parent the parent {@link RecyclerView} for the applied {@link SimpleDividerItemDecoration}.
     * @param divider the divider's target {@link Drawable} value.
     * @param position the divider's target position. This value is ranged.
     *                 See {@link GenericDecorationDividerPosition} for more information.
     * @throws UnsupportedOperationException if the given {@link GenericDecorationDividerPosition} is invalid.
     */
    public void applyDrawableDivider(@NonNull final Canvas canvas, @NonNull final RecyclerView parent,
                                     @NonNull final Drawable divider, @IntRange(from = 0, to = 5) final int position) {
        switch (position) {
            case GenericDecorationDividerPosition.POSITION_TOP:
                mDrawableDividerHelper.drawDrawableDividerPositionTop(canvas, parent, divider);
                break;
            case GenericDecorationDividerPosition.POSITION_BOTTOM:
                mDrawableDividerHelper.drawDrawableDividerPositionBottom(canvas, parent, divider);
                break;
            case GenericDecorationDividerPosition.POSITION_START:
                mDrawableDividerHelper.drawDrawableDividerPositionStart(canvas, parent, divider);
                break;
            case GenericDecorationDividerPosition.POSITION_END:
                mDrawableDividerHelper.drawDrawableDividerPositionEnd(canvas, parent, divider);
                break;
            case GenericDecorationDividerPosition.POSITION_START_END:
                mDrawableDividerHelper.drawDrawableDividerPositionStart(canvas, parent, divider);
                mDrawableDividerHelper.drawDrawableDividerPositionEnd(canvas, parent, divider);
                break;
            case GenericDecorationDividerPosition.POSITION_TOP_BOTTOM:
                mDrawableDividerHelper.drawDrawableDividerPositionTop(canvas, parent, divider);
                mDrawableDividerHelper.drawDrawableDividerPositionBottom(canvas, parent, divider);
                break;
            default:
// Path: gmlrva-lib/src/main/java/pt/simdea/gmlrva/lib/decoration/decorators/SimpleDividerItemDecoration.java
// public class SimpleDividerItemDecoration extends GenericItemDecoration<SimpleDividerItemDecorationSpec> {
// 
//     @NonNull
//     private final DecoratorDrawOverManager mDrawOverManager = new DecoratorDrawOverManager();
// 
//     @IntRange(from = 0)
//     private int mTopSpacing;
//     @IntRange(from = 0)
//     private int mBottomSpacing;
//     @IntRange(from = 0)
//     private int mStartSpacing;
//     @IntRange(from = 0)
//     private int mEndSpacing;
//     @IntRange(from = 0, to = 5)
//     private int mDividerPosition;
// 
//     @Nullable
//     private Drawable mDivider;
//     @Nullable
//     private Paint mDrawnDivider;
// 
//     /**
//      * Instantiates a new SimpleDividerItemDecoration.
//      * @param configurationSpec a valid {@link ItemDecorationSpec} containing this item decoration specification.
//      */
//     public SimpleDividerItemDecoration(@NonNull final SimpleDividerItemDecorationSpec configurationSpec) {
//         super(configurationSpec);
//     }
// 
//     /** {@inheritDoc} */
//     @Override
//     public void getItemOffsets(@NonNull final Rect outRect, @NonNull final View view,
//                                @NonNull final RecyclerView parent, @NonNull final RecyclerView.State state) {
//         outRect.top = mTopSpacing;
//         outRect.bottom = mBottomSpacing;
//         outRect.left = mStartSpacing;
//         outRect.right = mEndSpacing;
//     }
// 
//     /** {@inheritDoc} */
//     @Override
//     public void onDrawOver(@NonNull final Canvas canvas, @NonNull final RecyclerView parent,
//                            @NonNull final RecyclerView.State state) {
//         if (mDivider != null) {
//             mDrawOverManager.applyDrawableDivider(canvas, parent, mDivider, mDividerPosition);
//         } else if (mDrawnDivider != null) {
//             mDrawOverManager.applyDrawnDivider(canvas, parent, state, mDrawnDivider, mDividerPosition);
//         }
//     }
// 
//     /** {@inheritDoc} */
//     @Override
//     protected void applySpec(@NonNull final SimpleDividerItemDecorationSpec configurationSpec) {
//         /* Get Spacing Rules */
//         mTopSpacing = configurationSpec.getTopSpacing();
//         mBottomSpacing = configurationSpec.getBottomSpacing();
//         mStartSpacing = configurationSpec.getStartSpacing();
//         mEndSpacing = configurationSpec.getEndSpacing();
// 
//         /* Get Divider Rules */
//         mDivider = configurationSpec.getDivider();
//         mDividerPosition = configurationSpec.getDividerPosition();
//         mDrawnDivider = configurationSpec.getDrawnDivider();
//     }
// 
// }
// 
// Path: gmlrva-lib/src/main/java/pt/simdea/gmlrva/lib/utilities/GMLRVAConstants.java
// @SuppressWarnings("WeakerAccess")
// public final class GMLRVAConstants {
// 
//     /** Exception Messages */
//     public static final String ASSERTION_ERROR = "Instantiating utility class.";
//     public static final String UNSUPPORTED_ERROR = "Unsupported operation.";
// 
//     /**
//      * Instantiates a new GMLRVAConstants.
//      * Private to prevent instantiation.
//      * @throws AssertionError if this constructor is ever called. Utility classes should not be instantiated.
//      */
//     private GMLRVAConstants() {
//         throw new AssertionError(ASSERTION_ERROR); // Throw an exception if this *is* ever called
//     }
// 
// }


// Path: gmlrva-lib/src/main/java/pt/simdea/gmlrva/lib/decoration/helpers/DecoratorDrawOverManager.java
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import lombok.NoArgsConstructor;
import pt.simdea.gmlrva.lib.decoration.decorators.SimpleDividerItemDecoration;
import pt.simdea.gmlrva.lib.utilities.GMLRVAConstants;

     * @param parent the parent {@link RecyclerView} for the applied {@link SimpleDividerItemDecoration}.
     * @param divider the divider's target {@link Drawable} value.
     * @param position the divider's target position. This value is ranged.
     *                 See {@link GenericDecorationDividerPosition} for more information.
     * @throws UnsupportedOperationException if the given {@link GenericDecorationDividerPosition} is invalid.
     */
    public void applyDrawableDivider(@NonNull final Canvas canvas, @NonNull final RecyclerView parent,
                                     @NonNull final Drawable divider, @IntRange(from = 0, to = 5) final int position) {
        switch (position) {
            case GenericDecorationDividerPosition.POSITION_TOP:
                mDrawableDividerHelper.drawDrawableDividerPositionTop(canvas, parent, divider);
                break;
            case GenericDecorationDividerPosition.POSITION_BOTTOM:
                mDrawableDividerHelper.drawDrawableDividerPositionBottom(canvas, parent, divider);
                break;
            case GenericDecorationDividerPosition.POSITION_START:
                mDrawableDividerHelper.drawDrawableDividerPositionStart(canvas, parent, divider);
                break;
            case GenericDecorationDividerPosition.POSITION_END:
                mDrawableDividerHelper.drawDrawableDividerPositionEnd(canvas, parent, divider);
                break;
            case GenericDecorationDividerPosition.POSITION_START_END:
                mDrawableDividerHelper.drawDrawableDividerPositionStart(canvas, parent, divider);
                mDrawableDividerHelper.drawDrawableDividerPositionEnd(canvas, parent, divider);
                break;
            case GenericDecorationDividerPosition.POSITION_TOP_BOTTOM:
                mDrawableDividerHelper.drawDrawableDividerPositionTop(canvas, parent, divider);
                mDrawableDividerHelper.drawDrawableDividerPositionBottom(canvas, parent, divider);
                break;
            default:
                throw new UnsupportedOperationException(GMLRVAConstants.UNSUPPORTED_ERROR);