recycleadapter/src/main/java/com/kevadiyakrunalk/recycleadapter/utils/DebugWrapperAdapter.java
@Override
    public int wrapPosition(@NonNull AdapterPathSegment pathSegment, int position) {
        if (((mFlags & FLAG_VERIFY_WRAP_POSITION) != 0) && (getWrappedAdapter() instanceof WrapperAdapter)) {
            final WrapperAdapter wrapperAdapter = (WrapperAdapter) getWrappedAdapter();

            final int wrappedPosition = wrapperAdapter.wrapPosition(pathSegment, position);

            if (wrappedPosition != RecyclerView.NO_POSITION) {
                final UnwrapPositionResult tmpResult = new UnwrapPositionResult();
                wrapperAdapter.unwrapPosition(tmpResult, wrappedPosition);

                if (tmpResult.position != position) {
                    final String wrappedClassName = getWrappedAdapter().getClass().getSimpleName();
                    throw new IllegalStateException(
                            "Found a WrapperAdapter implementation issue while executing wrapPosition(): " + wrappedClassName + "\n" +
                                    "wrapPosition(" + position + ") returns " + wrappedPosition + ", but " +
                                    "unwrapPosition(" + wrappedPosition + ") returns " + tmpResult.position);
                }
            }
        }

        return super.wrapPosition(pathSegment, position);
    }
/**
     * {@inheritDoc}
     * <p>
     * This class also invokes {@link WrapperAdapter#unwrapPosition(UnwrapPositionResult, int)} of the child adapter when
     * verify option is enabled.
     * If inconsistency has been detected, <code>IllegalStateException</code> will be thrown.
     */

This class also invokes  WrapperAdapter#unwrapPosition(UnwrapPositionResult, int) of the child adapter when
verify option is enabled.
If inconsistency has been detected, IllegalStateException will be thrown.
This class also invokes WrapperAdapter#unwrapPosition ( UnwrapPositionResult int ) of the child adapter when verify option is enabled . If inconsistency has been detected IllegalStateException will be thrown .
@Override
    public int wrapPosition(@NonNull AdapterPathSegment pathSegment, int position) {
        if (((mFlags & FLAG_VERIFY_WRAP_POSITION) != 0) && (getWrappedAdapter() instanceof WrapperAdapter)) {
            final WrapperAdapter wrapperAdapter = (WrapperAdapter) getWrappedAdapter();
            final int wrappedPosition = wrapperAdapter.wrapPosition(pathSegment, position);
            if (wrappedPosition != RecyclerView.NO_POSITION) {
                final UnwrapPositionResult tmpResult = new UnwrapPositionResult();
                wrapperAdapter.unwrapPosition(tmpResult, wrappedPosition);
                if (tmpResult.position != position) {
                    final String wrappedClassName = getWrappedAdapter().getClass().getSimpleName();
                    throw new IllegalStateException(
                            "Found a WrapperAdapter implementation issue while executing wrapPosition(): " + wrappedClassName + "\n" +
                                    "wrapPosition(" + position + ") returns " + wrappedPosition + ", but " +
                                    "unwrapPosition(" + wrappedPosition + ") returns " + tmpResult.position);
                }
            }
        }
        return super.wrapPosition(pathSegment, position);
    }
@ Override public int wrapPosition ( @ NonNull AdapterPathSegment pathSegment , int position ) { if ( ( ( mFlags & FLAG_VERIFY_WRAP_POSITION ) != 0 ) && ( getWrappedAdapter ( ) instanceof WrapperAdapter ) ) { final WrapperAdapter wrapperAdapter = ( WrapperAdapter ) getWrappedAdapter ( ) ; final int wrappedPosition = wrapperAdapter . wrapPosition ( pathSegment , position ) ; if ( wrappedPosition != RecyclerView . NO_POSITION ) { final UnwrapPositionResult tmpResult = new UnwrapPositionResult ( ) ; wrapperAdapter . unwrapPosition ( tmpResult , wrappedPosition ) ; if ( tmpResult . position != position ) { final String wrappedClassName = getWrappedAdapter ( ) . getClass ( ) . getSimpleName ( ) ; throw new IllegalStateException ( "Found a WrapperAdapter implementation issue while executing wrapPosition(): " + wrappedClassName + "\n" + "wrapPosition(" + position + ") returns " + wrappedPosition + ", but " + "unwrapPosition(" + wrappedPosition + ") returns " + tmpResult . position ) ; } } } return super . wrapPosition ( pathSegment , position ) ; }
{@inheritDoc}
 <p>
 This class also invokes {@link WrapperAdapter#unwrapPosition(UnwrapPositionResult, int)} of the child adapter when
 verify option is enabled.
{ @inheritDoc } <p > This class also invokes { @link WrapperAdapter#unwrapPosition ( UnwrapPositionResult int ) } of the child adapter when verify option is enabled .