Class RectangularArraySummary
java.lang.Object
RJavaArrayIterator
RectangularArraySummary
public class RectangularArraySummary
- extends RJavaArrayIterator
Utility class to extract something from a rectangular array
Method Summary |
void |
checkComparableObjects()
|
boolean |
containsComparableObjects()
|
java.lang.Object |
max(boolean narm)
Iterates over the array to find the maximum value
(in the sense of the Comparable interface) |
java.lang.Object |
min(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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RectangularArraySummary
public RectangularArraySummary(java.lang.Object array,
int[] dimensions)
throws NotAnArrayException,
NotComparableException
- Constructor
- Parameters:
array
- the array to check
- Throws:
NotAnArrayException
- if array is not an array
NotComparableException
RectangularArraySummary
public RectangularArraySummary(java.lang.Object array,
int length)
throws NotAnArrayException,
NotComparableException
- Throws:
NotAnArrayException
NotComparableException
min
public java.lang.Object min(boolean narm)
- Iterates over the array to find the minimum value
(in the sense of the Comparable interface)
max
public java.lang.Object max(boolean narm)
- Iterates over the array to find the maximum value
(in the sense of the Comparable interface)
range
public 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)
checkComparableObjects
public void checkComparableObjects()
throws NotComparableException
- Throws:
NotComparableException
containsComparableObjects
public boolean containsComparableObjects()