/** * Compares this page size with the given object. * * @param o * the other object. * @return true, if the given object is also a PageSize object and has the same width and height, false otherwise. */ public boolean equals( final Object o ) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } final PageSize pageSize = (PageSize) o; if ( equal( pageSize.height, height ) == false ) { return false; } if ( equal( pageSize.width, width ) == false ) { return false; } return true; }