public int[] stringToDigits(String x) {

		boolean isNegative = (x.length() > 1 && x.charAt(0) == '-')?true:false;
		int capacity  = isNegative?x.length() - 1:x.length();
		this.digits = new int[capacity];

		for (int i = x.length() -  1, j = 0; i >= (isNegative ? 1 : 0); i--, j++) {
			if (Character.isDigit(x.charAt(i))) {
				digits[j] = x.charAt(i) - '0';
			}else {
				throw new IllegalArgumentException();
			}
		}

		return digits;
	}