Class RectangularArraySummary
- java.lang.Object
- 
- RJavaArrayIterator
- 
- RectangularArraySummary
 
 
- 
 public class RectangularArraySummary extends RJavaArrayIterator Utility class to extract something from a rectangular array
- 
- 
Field Summary- 
Fields inherited from class RJavaArrayIteratorarray, dimensions, dimprod, increment, index, nd, position, start
 
- 
 - 
Constructor SummaryConstructors Constructor Description RectangularArraySummary(java.lang.Object array, int length)RectangularArraySummary(java.lang.Object array, int[] dimensions)Constructor
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckComparableObjects()booleancontainsComparableObjects()java.lang.Objectmax(boolean narm)Iterates over the array to find the maximum value (in the sense of the Comparable interface)java.lang.Objectmin(boolean narm)Iterates over the array to find the minimum value (in the sense of the Comparable interface)java.lang.Object[]range(boolean narm)Iterates over the array to find the range of the java array (in the sense of the Comparable interface)- 
Methods inherited from class RJavaArrayIteratorgetArray, getArrayClassName, getDimensions, hasNext, next
 
- 
 
- 
- 
- 
Constructor Detail- 
RectangularArraySummarypublic RectangularArraySummary(java.lang.Object array, int[] dimensions) throws NotAnArrayException, NotComparableExceptionConstructor- Parameters:
- array- the array to check
- Throws:
- NotAnArrayException- if array is not an array
- NotComparableException
 
 - 
RectangularArraySummarypublic RectangularArraySummary(java.lang.Object array, int length) throws NotAnArrayException, NotComparableException
 
- 
 - 
Method Detail- 
minpublic java.lang.Object min(boolean narm) Iterates over the array to find the minimum value (in the sense of the Comparable interface)
 - 
maxpublic java.lang.Object max(boolean narm) Iterates over the array to find the maximum value (in the sense of the Comparable interface)
 - 
rangepublic java.lang.Object[] range(boolean narm) Iterates over the array to find the range of the java array (in the sense of the Comparable interface)
 - 
checkComparableObjectspublic void checkComparableObjects() throws NotComparableException- Throws:
- NotComparableException
 
 - 
containsComparableObjectspublic boolean containsComparableObjects() 
 
- 
 
-