Updating to NBMs from NetBeans 8.0.1 as some of them are required to run on JDK8
1 package org.apidesign.math.test;
3 import org.apidesign.math.Arithmetica;
5 /** Class showing inventive, non-expected use of
6 * Arithmetica methods to do multiplication instead of
9 // BEGIN: design.composition.arith.factorial
10 public final class Factorial extends Arithmetica {
11 public static int factorial(int n) {
12 return new Factorial().sumRange(1, n);
15 public int sumTwo(int one, int second) {
19 // END: design.composition.arith.factorial