Package ucar.nc2.util
Class CompareNetcdf2
- java.lang.Object
-
- ucar.nc2.util.CompareNetcdf2
-
public class CompareNetcdf2 extends Object
Compare two NetcdfFile. Doesnt fail (eg doesnt use assert), places results in Formatter. TODO will move to test classes in ver6.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CompareNetcdf2.Netcdf4ObjectFilter
static interface
CompareNetcdf2.ObjFilter
-
Field Summary
Fields Modifier and Type Field Description static CompareNetcdf2.ObjFilter
IDENTITY_FILTER
-
Constructor Summary
Constructors Constructor Description CompareNetcdf2()
CompareNetcdf2(Formatter f)
CompareNetcdf2(Formatter f, boolean showCompare, boolean showEach, boolean compareData)
CompareNetcdf2(Formatter f, boolean showCompare, boolean showEach, boolean compareData, boolean ignoreattrcase)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
checkContains(String what, List<Object> container, List<Object> wantList, Formatter f)
boolean
compare(NetcdfFile org, NetcdfFile copy)
boolean
compare(NetcdfFile org, NetcdfFile copy, boolean showCompare, boolean showEach, boolean compareData)
Deprecated.use constructor to set options, then compare(NetcdfFile org, NetcdfFile copy)boolean
compare(NetcdfFile org, NetcdfFile copy, CompareNetcdf2.ObjFilter filter)
boolean
compare(NetcdfFile org, NetcdfFile copy, CompareNetcdf2.ObjFilter objFilter, boolean showCompare, boolean showEach, boolean compareData)
Deprecated.use constructor to set options, then compare(NetcdfFile org, NetcdfFile copy, ObjFilter filter)boolean
compareData(String name, double[] data1, double[] data2)
static boolean
compareData(String name, Array data1, double[] data2)
static boolean
compareData(String name, Array data1, Array data2)
boolean
compareData(String name, Array data1, Array data2, boolean justOne)
static boolean
compareFiles(NetcdfFile org, NetcdfFile copy, Formatter f)
static boolean
compareFiles(NetcdfFile org, NetcdfFile copy, Formatter f, boolean _compareData, boolean _showCompare, boolean _showEach)
static boolean
compareLists(List org, List copy, Formatter f)
boolean
compareVariable(Variable org, Variable copy, CompareNetcdf2.ObjFilter filter)
boolean
compareVariables(NetcdfFile org, NetcdfFile copy)
boolean
enumsAreEqual(EnumTypedef enum1, EnumTypedef enum2)
Dimension
findDimension(Group g, Dimension dim)
EnumTypedef
findEnum(Group g, EnumTypedef typedef, CompareNetcdf2.ObjFilter filter)
static void
main(String[] arg)
-
-
-
Field Detail
-
IDENTITY_FILTER
public static final CompareNetcdf2.ObjFilter IDENTITY_FILTER
-
-
Constructor Detail
-
CompareNetcdf2
public CompareNetcdf2()
-
CompareNetcdf2
public CompareNetcdf2(Formatter f)
-
CompareNetcdf2
public CompareNetcdf2(Formatter f, boolean showCompare, boolean showEach, boolean compareData)
-
CompareNetcdf2
public CompareNetcdf2(Formatter f, boolean showCompare, boolean showEach, boolean compareData, boolean ignoreattrcase)
-
-
Method Detail
-
enumsAreEqual
public boolean enumsAreEqual(EnumTypedef enum1, EnumTypedef enum2)
-
compareFiles
public static boolean compareFiles(NetcdfFile org, NetcdfFile copy, Formatter f)
-
compareFiles
public static boolean compareFiles(NetcdfFile org, NetcdfFile copy, Formatter f, boolean _compareData, boolean _showCompare, boolean _showEach)
-
checkContains
public static boolean checkContains(String what, List<Object> container, List<Object> wantList, Formatter f)
-
compare
public boolean compare(NetcdfFile org, NetcdfFile copy)
-
compare
public boolean compare(NetcdfFile org, NetcdfFile copy, @Nullable CompareNetcdf2.ObjFilter filter)
-
compare
@Deprecated public boolean compare(NetcdfFile org, NetcdfFile copy, boolean showCompare, boolean showEach, boolean compareData)
Deprecated.use constructor to set options, then compare(NetcdfFile org, NetcdfFile copy)
-
compare
@Deprecated public boolean compare(NetcdfFile org, NetcdfFile copy, @Nullable CompareNetcdf2.ObjFilter objFilter, boolean showCompare, boolean showEach, boolean compareData)
Deprecated.use constructor to set options, then compare(NetcdfFile org, NetcdfFile copy, ObjFilter filter)
-
compareVariables
public boolean compareVariables(NetcdfFile org, NetcdfFile copy)
-
compareVariable
public boolean compareVariable(Variable org, Variable copy, CompareNetcdf2.ObjFilter filter)
-
findEnum
public EnumTypedef findEnum(Group g, EnumTypedef typedef, CompareNetcdf2.ObjFilter filter)
-
compareData
public boolean compareData(String name, double[] data1, double[] data2)
-
main
public static void main(String[] arg) throws IOException
- Throws:
IOException
-
-