What you've got is not an array of methods, it is an array of booleans. Each method is called at the moment the array is created, and the return values of these ten methods become values in the array.
If you would like to make an array of something that you can call, make an array of interface implementations that have a method returning boolean. The way you do this depends on the version of Java. Prior to Java 8, you would do it like this:
interface Predicate {
boolean test();
}
Predicate[] assertionsArray = new Predicate[] {
new Predicate() {public boolean test() {return assert0(); }}
, new Predicate() {public boolean test() {return assert1(); }}
, new Predicate() {public boolean test() {return assert2(); }}
...
, new Predicate() {public boolean test() {return assert9(); }}
};
Now you can call the assertions like this:
if (assertionsArray[figureIndex].test()) {
...
}
Starting with Java 8 you can use the predicate interface included with Java, and use lambdas instead of anonymous implementations:
Predicate<Object>[] assertionsArray = new Predicate<Object>[] {
o -> assert0(), o -> assert1(), o -> assert2(), o -> assert3(),
, o -> assert4(), ...
};
...
if (assertionsArray[figureIndex].test(null)) {
...
}
boolean. Methods are not like function pointers in C. With Java8, however, it's possible to achieve what you want.