public String nextSnapshotVersion(final Integer index) {
        List<String> digits = getDigits();

        String nextVersion = null;

        if (digits != null) {
            if (index != null && index >= 0 && index < digits.size()) {
                int origDigitsLength = joinDigitString(digits).length();
                digits.set(index,
                        incrementVersionString((String) digits.get(index)));
                for (int i = index + 1; i < digits.size(); i++) {
                    digits.set(i, "0");
                }
                String digitsStr = joinDigitString(digits);
                nextVersion = digitsStr
                        + getSnapshotVersionString()
                                .substring(origDigitsLength);
            } else {
                nextVersion = getNextVersion().getSnapshotVersionString();
            }
        } else {
            nextVersion = getSnapshotVersionString();
        }
        return nextVersion;
    }
public String nextSnapshotVersion ( final Integer index ) { List < String > digits = getDigits ( ) ; String nextVersion = null ; if ( digits != null ) { if ( index != null && index >= 0 && index < digits . size ( ) ) { int origDigitsLength = joinDigitString ( digits ) . length ( ) ; digits . set ( index , incrementVersionString ( ( String ) digits . get ( index ) ) ) ; for ( int i = index + 1 ; i < digits . size ( ) ; i ++ ) { digits . set ( i , "0" ) ; } String digitsStr = joinDigitString ( digits ) ; nextVersion = digitsStr + getSnapshotVersionString ( ) . substring ( origDigitsLength ) ; } else { nextVersion = getNextVersion ( ) . getSnapshotVersionString ( ) ; } } else { nextVersion = getSnapshotVersionString ( ) ; } return nextVersion ; }
Gets next SNAPSHOT version. If index is <code>null</code> or not valid
then it delegates to {@link #getNextVersion()} method.

@param index
Which part of version to increment.
@return Next SNAPSHOT version.