public List<String> setParameters(T action, boolean positive) {

        BigDecimal max, min;
        int minLen;
        int maxLen;
        int[] lengths = new int[2];
        boolean isNullable = true;
        String nullable = action.getNullable();

        if (!nullable.equalsIgnoreCase("true")) {
            isNullable = false;
        }

        if (action.getLength() == null) {
            lengths[0] = Integer.parseInt("10");
            lengths[1] = Integer.parseInt("0");
        } else {
            if (action.getLength().contains(",")) {
                lengths[0] = Integer.parseInt(action.getLength().split(",")[0]);
                lengths[1] = Integer.parseInt(action.getLength().split(",")[1]);
            } else {
                lengths[0] = Integer.parseInt(action.getLength());
                if (Integer.parseInt(action.getLength()) > 38) {
                    lengths[0] = Integer.parseInt("38");
                }
                lengths[1] = Integer.parseInt("0");
            }
        }
        if (action.getMinLen() != null) {
            if (Integer.parseInt(action.getMinLen()) <= lengths[0]) {
                minLen = Integer.parseInt(action.getMinLen());
            } else {
                minLen = lengths[0];
            }
        } else {
            minLen = -1;
        }
        if (action.getMaxLen() != null) {
            if (Integer.parseInt(action.getMaxLen()) <= lengths[0]) {
                maxLen = Integer.parseInt(action.getMaxLen());
            } else {
                maxLen = lengths[0];
            }
        } else {
            maxLen = -1;
        }
        int exp = lengths[0];
        if (action.getMin() != null) {
            min = new BigDecimal(action.getMin());
        } else {
            min = BigDecimal.TEN.pow(exp);
            min = min.negate();
            min = min.add(BigDecimal.ONE);
        }

        if (action.getMax() != null) {
            max = new BigDecimal(action.getMax());
        } else {
            max = BigDecimal.TEN.pow(exp);
            max = max.subtract(BigDecimal.ONE);
        }

        if (positive) {
            return positive(isNullable, min, max, minLen, maxLen, lengths);
        } else {
            return negative(isNullable, min, max, minLen, maxLen, lengths);
        }
    }
public List < String > setParameters ( T action , boolean positive ) { BigDecimal max , min ; int minLen ; int maxLen ; int [ ] lengths = new int [ 2 ] ; boolean isNullable = true ; String nullable = action . getNullable ( ) ; if ( ! nullable . equalsIgnoreCase ( "true" ) ) { isNullable = false ; } if ( action . getLength ( ) == null ) { lengths [ 0 ] = Integer . parseInt ( "10" ) ; lengths [ 1 ] = Integer . parseInt ( "0" ) ; } else { if ( action . getLength ( ) . contains ( "," ) ) { lengths [ 0 ] = Integer . parseInt ( action . getLength ( ) . split ( "," ) [ 0 ] ) ; lengths [ 1 ] = Integer . parseInt ( action . getLength ( ) . split ( "," ) [ 1 ] ) ; } else { lengths [ 0 ] = Integer . parseInt ( action . getLength ( ) ) ; if ( Integer . parseInt ( action . getLength ( ) ) > 38 ) { lengths [ 0 ] = Integer . parseInt ( "38" ) ; } lengths [ 1 ] = Integer . parseInt ( "0" ) ; } } if ( action . getMinLen ( ) != null ) { if ( Integer . parseInt ( action . getMinLen ( ) ) <= lengths [ 0 ] ) { minLen = Integer . parseInt ( action . getMinLen ( ) ) ; } else { minLen = lengths [ 0 ] ; } } else { minLen = - 1 ; } if ( action . getMaxLen ( ) != null ) { if ( Integer . parseInt ( action . getMaxLen ( ) ) <= lengths [ 0 ] ) { maxLen = Integer . parseInt ( action . getMaxLen ( ) ) ; } else { maxLen = lengths [ 0 ] ; } } else { maxLen = - 1 ; } int exp = lengths [ 0 ] ; if ( action . getMin ( ) != null ) { min = new BigDecimal ( action . getMin ( ) ) ; } else { min = BigDecimal . TEN . pow ( exp ) ; min = min . negate ( ) ; min = min . add ( BigDecimal . ONE ) ; } if ( action . getMax ( ) != null ) { max = new BigDecimal ( action . getMax ( ) ) ; } else { max = BigDecimal . TEN . pow ( exp ) ; max = max . subtract ( BigDecimal . ONE ) ; } if ( positive ) { return positive ( isNullable , min , max , minLen , maxLen , lengths ) ; } else { return negative ( isNullable , min , max , minLen , maxLen , lengths ) ; } }
@param action   an Action of the type handled by this class
@param positive a boolean denoting positive or negative cases
@return a list of Strings that contain the states