@Test public void testArgumentChecks() { Category[] categories; categories = new Category[] { new Category("No data", null, 0), new Category("Land", null, 10), new Category("Clouds", null, 2), new Category("Land again", null, 10) }; try { new CategoryList(categories, null); fail("Argument check"); } catch (IllegalArgumentException exception) { if (VERBOSE) { System.out.println(exception.getLocalizedMessage()); } } for (int i=0; i<categories.length; i++) { final Category cat = categories[i]; assertSame(cat, cat.geophysics(true).geophysics(false)); categories[i] = cat.geophysics(true); } try { new CategoryList(categories, null); fail("Argument check"); } catch (IllegalArgumentException exception) { if (VERBOSE) { System.out.println(exception.getLocalizedMessage()); } } categories = XArray.resize(categories, categories.length-1); new CategoryList(categories, null); }
public CategoryList geophysics(final boolean geo) { final CategoryList scaled = geo ? inverse : this; assert scaled.isGeophysics(geo); return scaled; }
CategoryList extends AbstractList<Category> implements MathTransform1D, Comparator<Category>, Serializable { public CategoryList geophysics(final boolean geo) { final CategoryList scaled = geo ? inverse : this; assert scaled.isGeophysics(geo); return scaled; } }
CategoryList extends AbstractList<Category> implements MathTransform1D, Comparator<Category>, Serializable { public CategoryList geophysics(final boolean geo) { final CategoryList scaled = geo ? inverse : this; assert scaled.isGeophysics(geo); return scaled; } CategoryList(final Category[] categories, final Unit<?> units);   CategoryList(Category[] categories, Unit<?> units, boolean searchNearest, CategoryList inverse); }
CategoryList extends AbstractList<Category> implements MathTransform1D, Comparator<Category>, Serializable { public CategoryList geophysics(final boolean geo) { final CategoryList scaled = geo ? inverse : this; assert scaled.isGeophysics(geo); return scaled; } CategoryList(final Category[] categories, final Unit<?> units);   CategoryList(Category[] categories, Unit<?> units, boolean searchNearest, CategoryList inverse); final int compare(final Category o1, final Category o2); CategoryList geophysics(final boolean geo); final InternationalString getName(); Unit<?> getUnits(); final NumberRange<?> getRange(); final ColorModel getColorModel(final int visibleBand, final int numBands); final ColorModel getColorModel(final int visibleBand, final int numBands, final int type); final Category getCategory(final double sample); final String format(final double value, final Locale locale); final int size(); final Category get(final int i); @Override final Category[] toArray(); @Override final String toString(); @Override boolean equals(final Object object); final int getSourceDimensions(); final int getTargetDimensions(); boolean isIdentity(); final MathTransform1D inverse(); final DirectPosition transform(final DirectPosition ptSrc, DirectPosition ptDst); final Matrix derivative(final DirectPosition point); final double derivative(final double value); final double transform(double value); final void transform(double[] srcPts, int srcOff,
                                double[] dstPts, int dstOff, int numPts); final void transform(float[] srcPts, int srcOff,
                                float[] dstPts, int dstOff, int numPts); final void transform(float[] srcPts, int srcOff,
                                double[] dstPts, int dstOff, int numPts); final void transform(double[] srcPts, int srcOff,
                                float[] dstPts, int dstOff, int numPts); final void transform(final WritableRectIter iterator); String toWKT(); }
CategoryList extends AbstractList<Category> implements MathTransform1D, Comparator<Category>, Serializable { public CategoryList geophysics(final boolean geo) { final CategoryList scaled = geo ? inverse : this; assert scaled.isGeophysics(geo); return scaled; } CategoryList(final Category[] categories, final Unit<?> units);   CategoryList(Category[] categories, Unit<?> units, boolean searchNearest, CategoryList inverse); final int compare(final Category o1, final Category o2); CategoryList geophysics(final boolean geo); final InternationalString getName(); Unit<?> getUnits(); final NumberRange<?> getRange(); final ColorModel getColorModel(final int visibleBand, final int numBands); final ColorModel getColorModel(final int visibleBand, final int numBands, final int type); final Category getCategory(final double sample); final String format(final double value, final Locale locale); final int size(); final Category get(final int i); @Override final Category[] toArray(); @Override final String toString(); @Override boolean equals(final Object object); final int getSourceDimensions(); final int getTargetDimensions(); boolean isIdentity(); final MathTransform1D inverse(); final DirectPosition transform(final DirectPosition ptSrc, DirectPosition ptDst); final Matrix derivative(final DirectPosition point); final double derivative(final double value); final double transform(double value); final void transform(double[] srcPts, int srcOff,
                                double[] dstPts, int dstOff, int numPts); final void transform(float[] srcPts, int srcOff,
                                float[] dstPts, int dstOff, int numPts); final void transform(float[] srcPts, int srcOff,
                                double[] dstPts, int dstOff, int numPts); final void transform(double[] srcPts, int srcOff,
                                float[] dstPts, int dstOff, int numPts); final void transform(final WritableRectIter iterator); String toWKT();  }