ESRIBounds implements Comparable<ESRIBounds> { public void ensureMinMax() { double t; if (this.maxx < this.minx) { t = this.minx; this.minx = this.maxx; this.maxx = t; } if (this.maxy < this.miny) { t = this.miny; this.miny = this.maxy; this.maxy = t; } if (this.maxz < this.minz) { t = this.minz; this.minz = this.maxz; this.maxz = t; } if (this.maxm < this.minm) { t = this.minm; this.minm = this.maxm; this.maxm = t; } } ESRIBounds();  ESRIBounds(ESRIPoint point);  ESRIBounds(double minx, double maxx, double miny, double maxy);  ESRIBounds(double minx, double maxx, double miny, double maxy, double minz, double maxz, double minm, double maxm);  ESRIBounds(ESRIBounds bounds); ESRIBounds createUnion(ESRIBounds bounds); void add(ESRIPoint point); @Override @Pure boolean equals(Object obj); @Pure @Override int hashCode(); @Pure @Override int compareTo(ESRIBounds bounds); @Pure double getMinX(); @Pure double getCenterX(); @Pure double getMaxX(); @Pure double getCenterY(); @Pure double getMinY(); @Pure double getMaxY(); @Pure double getMinZ(); @Pure double getCenterZ(); @Pure double getMaxZ(); @Pure double getMinM(); @Pure double getCenterM(); @Pure double getMaxM(); @Pure Rectangle2d toRectangle2d(); void ensureMinMax(); @Pure @Override String toString();  }
@Test public void testEnsureMinMax() { ESRIBounds b = new ESRIBounds( this.maxx, this.minx, this.miny, this.maxy, this.maxz, this.minz, this.minm, this.maxm); b.ensureMinMax(); assertEpsilonEquals(this.minx, this.bounds.getMinX()); assertEpsilonEquals(this.maxx, this.bounds.getMaxX()); assertEpsilonEquals(this.miny, this.bounds.getMinY()); assertEpsilonEquals(this.maxy, this.bounds.getMaxY()); assertEpsilonEquals(this.minz, this.bounds.getMinZ()); assertEpsilonEquals(this.maxz, this.bounds.getMaxZ()); assertEpsilonEquals(this.minm, this.bounds.getMinM()); assertEpsilonEquals(this.maxm, this.bounds.getMaxM()); }