Sets the number of digits of the numbers, the preference should allow to choose.

@param numberOfDigits
The number of digits, which should be set, as an {@link Integer} value. The number of
digits must be at least 1
966645
public final void setNumberOfDigits(final int numberOfDigits) {
        Condition.INSTANCE
                .ensureAtLeast(numberOfDigits, 1, "The number of digits must be at least 1");
        this.numberOfDigits = numberOfDigits;
        setNumber(Math.min(getNumber(), getMaxNumber(numberOfDigits)));
    }
666142
static public boolean containsOnlyDigits(String string0) {
        // are they all digits?
        for (int i = 0; i < string0.length(); i++) {
            if (!Character.isDigit(string0.charAt(i))) {
                return false;
            }
        }
        return true;
    }
345905
public static NumberFormat makeNumberFormat(int digits) {
    // Prefer predefined number formats where applicable.
    // TODO: cache others, too?
    switch(digits){
    case 0:
      return NF0;
    case 2:
      return NF2;
    case 3:
      return NF3;
    case 4:
      return NF4;
    case 6:
      return NF6;
    case 8:
      return NF8;
    }
    final NumberFormat nf = NumberFormat.getInstance(Locale.US);
    nf.setMaximumFractionDigits(digits);
    nf.setMinimumFractionDigits(digits);
    nf.setGroupingUsed(false);
    return nf;
  }
1044256
private int chooseRingNumber() {
        for (int i = 1; i < rnums.length; i++) {
            if (rnums[i] == 0) {
                rnums[i] = 1;
                return i;
            }
        }
        throw new IllegalStateException("No more ring numbers available!");
    }
1119869
public void setCount(int count)
    {
        if (count < 0 || 0xFF < count)
        {
            throw new IllegalArgumentException("'count' is out of the valid range: " + count);
        }

        mCount = count;

        getData()[COUNT_INDEX] = (byte)count;
    }
848353
public void update(int number) {
        byte[] numberInBytes = new byte[ByteUtils.SIZE_OF_INT];
        ByteUtils.writeInt(numberInBytes, number, 0);
        update(numberInBytes);
    }
190953
public void setCurrencyDigits(Integer currDigs)
   {
      if (currDigs == null)
      {
         currDigs = DEFAULT_CURRENCY_DIGITS;
      }
      set(ProjectField.CURRENCY_DIGITS, currDigs);
   }
1124085
public void setPhoneNumbers(java.util.Collection<PhoneNumber> phoneNumbers) {
        if (phoneNumbers == null) {
            this.phoneNumbers = null;
            return;
        }

        this.phoneNumbers = new java.util.ArrayList<PhoneNumber>(phoneNumbers);
    }
242440
private void initLocalZeroPaddingNumberFormat() {
        if (numberFormat instanceof DecimalFormat) {
            decDigits = ((DecimalFormat)numberFormat).getDecimalFormatSymbols().getDigits();
            useLocalZeroPaddingNumberFormat = true;
        } else if (numberFormat instanceof DateNumberFormat) {
            decDigits = ((DateNumberFormat)numberFormat).getDigits();
            useLocalZeroPaddingNumberFormat = true;
        } else {
            useLocalZeroPaddingNumberFormat = false;
        }

        if (useLocalZeroPaddingNumberFormat) {
            decimalBuf = new char[DECIMAL_BUF_SIZE];
        }
    }
1328851
function lengthOfNumber(number) {
        if (isNumber(number)) {
            var length_1 = 0;
            while (number > 0) {
                length_1++;
                number = backIntegerOfNumber(number / 10);
            }
            return length_1;
        }
        else {
            return 0;
        }
    }
82692
@Override
    public MonetaryAmountFactory<T> setNumber(Number number) {
        this.number = ConvertBigDecimal.of(number);
        return this;
    }
946976
private void digit(StringBuilder rtn) {

	while (cfml.isValidIndex()) {
	    if (!cfml.isCurrentDigit()) break;
	    rtn.append(cfml.getCurrentLower());
	    cfml.next();
	}
    }
124062
public void setDecimals(final int DECIMALS) {
        if (null == decimals) {
            _decimals = Helper.clamp(0, MAX_NO_OF_DECIMALS, DECIMALS);
            updateFormatString();
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            decimals.set(DECIMALS);
        }
    }
404375
final void set(boolean isNegative, String s, int maximumDigits, boolean fixedPoint) {
        this.isNegative = isNegative;
        int len = s.length();
        char[] source = getDataChars(len);
        s.getChars(0, len, source, 0);

        decimalAt = -1;
        count = 0;
        int exponent = 0;
        // Number of zeros between decimal point and first non-zero digit after
        // decimal point, for numbers < 1.
        int leadingZerosAfterDecimal = 0;
        boolean nonZeroDigitSeen = false;

        for (int i = 0; i < len; ) {
            char c = source[i++];
            if (c == '.') {
                decimalAt = count;
            } else if (c == 'e' || c == 'E') {
                exponent = parseInt(source, i, len);
                break;
            } else {
                if (!nonZeroDigitSeen) {
                    nonZeroDigitSeen = (c != '0');
                    if (!nonZeroDigitSeen && decimalAt != -1)
                        ++leadingZerosAfterDecimal;
                }
                if (nonZeroDigitSeen) {
                    digits[count++] = c;
                }
            }
        }
        if (decimalAt == -1) {
            decimalAt = count;
        }
        if (nonZeroDigitSeen) {
            decimalAt += exponent - leadingZerosAfterDecimal;
        }

        if (fixedPoint) {
            // The negative of the exponent represents the number of leading
            // zeros between the decimal and the first non-zero digit, for
            // a value < 0.1 (e.g., for 0.00123, -decimalAt == 2).  If this
            // is more than the maximum fraction digits, then we have an underflow
            // for the printed representation.
            if (-decimalAt > maximumDigits) {
                // Handle an underflow to zero when we round something like
                // 0.0009 to 2 fractional digits.
                count = 0;
                return;
            } else if (-decimalAt == maximumDigits) {
                // If we round 0.0009 to 3 fractional digits, then we have to
                // create a new one digit in the least significant location.
                if (shouldRoundUp(0)) {
                    count = 1;
                    ++decimalAt;
                    digits[0] = '1';
                } else {
                    count = 0;
                }
                return;
            }
            // else fall through
        }

        // Eliminate trailing zeros.
        while (count > 1 && digits[count - 1] == '0') {
            --count;
        }

        // Eliminate digits beyond maximum digits to be displayed.
        // Round up if appropriate.
        round(fixedPoint ? (maximumDigits + decimalAt) : maximumDigits);
    }
1193340
def of number
      raise_on_type_mismatch number
      digits = convert_number_to_digits(number)
      digits.reduce(0){ |check, digit| QUASIGROUP[check][digit] }
    end
144269
public void setDigits10Map(String[] digits10Map) {
        ArgUtils.notEmpty(digits10Map, "digits10Map");

        if(digits10Map.length != 5) {
            throw new IllegalArgumentException("digits10Map length should be 5.");
        }

        this.digits10Map = digits10Map;
    }
1068343
public void setChapterNumber(int number) {
    	numbers.set(numbers.size() - 1, Integer.valueOf(number));
    	Object s;
    	for (Iterator i = iterator(); i.hasNext(); ) {
    		s = i.next();
    		if (s instanceof Section) {
    			((Section)s).setChapterNumber(number);
    		}
    	}
    }