List of usage examples for org.apache.commons.math.linear AnyMatrix isSquare
boolean isSquare();
From source file:com.macasaet.lambda.fluent.Examples.java
/** * This is the standard way of defining {@link Predicate Predicates} in Guava. Notice that even in this simple case * of a single method invocation, the Predicate definition uses five lines. *///from w ww . jav a 2 s.c o m @Test public final void definePredicateWithAnonymousInnerClass() { final Predicate<? super AnyMatrix> matrixIsSquare = new Predicate<AnyMatrix>() { public boolean apply(final AnyMatrix input) { return input.isSquare(); } }; final Collection<? extends AnyMatrix> result = filter(matrices, matrixIsSquare); assertTrue(result.contains(squareMatrix)); assertFalse(result.contains(nonSquareMatrix)); }