Code example for BigInteger

Methods: compareTo

0
	/** 
	 * Check whether there are more permutations. 
	 */ 
	public boolean hasMore() 
	{ 
		return numLeft.compareTo(BigInteger.ZERO) == 1;
	} 
 
	/** 
	 * Compute factorial. 
	 */ 
	private static BigInteger getFactorial(int n)
	{ 
		BigInteger fact = BigInteger.ONE;
		for (int i = n; i > 1; i--) {
			fact = fact.multiply(new BigInteger(Integer.toString(i)));
		} 
		return fact;
	} 
 
	/**