@Test public void testEquals() { DefaultImageReference imageRef = new DefaultImageReference( 300, 500 ); assertThat( imageRef.equals( null ), is( equalTo( false ) ) ); assertThat( imageRef.equals( "str" ), is( equalTo( false ) ) ); assertThat( imageRef.equals( new DefaultImageReference( 301, 501 ) ), is( equalTo( false ) ) ); assertThat( imageRef.equals( new DefaultImageReference( 300, 501 ) ), is( equalTo( false ) ) ); assertThat( imageRef.equals( new DefaultImageReference( 300, 500 ) ), is( equalTo( true ) ) ); imageRef.setScale( 2.0f, 1.0f ); assertThat( imageRef.equals( new DefaultImageReference( 300, 500 ) ), is( equalTo( false ) ) ); imageRef.setScale( 1.0f, 1.5f ); assertThat( imageRef.equals( new DefaultImageReference( 300, 500 ) ), is( equalTo( false ) ) ); }
public boolean equals( final Object obj ) { if ( obj == null ) { return false; } if ( obj instanceof DefaultImageReference == false ) { return false; } final DefaultImageReference ref = (DefaultImageReference) obj; if ( ObjectUtilities.equal( String.valueOf( url ), String.valueOf( ref.url ) ) == false ) { return false; } if ( width != ref.width ) { return false; } if ( height != ref.height ) { return false; } if ( scaleX != ref.scaleX ) { return false; } if ( scaleY != ref.scaleY ) { return false; } return true; }
DefaultImageReference implements Serializable, URLImageContainer, LocalImageContainer { public boolean equals( final Object obj ) { if ( obj == null ) { return false; } if ( obj instanceof DefaultImageReference == false ) { return false; } final DefaultImageReference ref = (DefaultImageReference) obj; if ( ObjectUtilities.equal( String.valueOf( url ), String.valueOf( ref.url ) ) == false ) { return false; } if ( width != ref.width ) { return false; } if ( height != ref.height ) { return false; } if ( scaleX != ref.scaleX ) { return false; } if ( scaleY != ref.scaleY ) { return false; } return true; } }
DefaultImageReference implements Serializable, URLImageContainer, LocalImageContainer { public boolean equals( final Object obj ) { if ( obj == null ) { return false; } if ( obj instanceof DefaultImageReference == false ) { return false; } final DefaultImageReference ref = (DefaultImageReference) obj; if ( ObjectUtilities.equal( String.valueOf( url ), String.valueOf( ref.url ) ) == false ) { return false; } if ( width != ref.width ) { return false; } if ( height != ref.height ) { return false; } if ( scaleX != ref.scaleX ) { return false; } if ( scaleY != ref.scaleY ) { return false; } return true; } DefaultImageReference( final Image img );  DefaultImageReference( final Resource imageResource );  DefaultImageReference( final int w, final int h );  DefaultImageReference( final DefaultImageReference parent ); }
DefaultImageReference implements Serializable, URLImageContainer, LocalImageContainer { public boolean equals( final Object obj ) { if ( obj == null ) { return false; } if ( obj instanceof DefaultImageReference == false ) { return false; } final DefaultImageReference ref = (DefaultImageReference) obj; if ( ObjectUtilities.equal( String.valueOf( url ), String.valueOf( ref.url ) ) == false ) { return false; } if ( width != ref.width ) { return false; } if ( height != ref.height ) { return false; } if ( scaleX != ref.scaleX ) { return false; } if ( scaleY != ref.scaleY ) { return false; } return true; } DefaultImageReference( final Image img );  DefaultImageReference( final Resource imageResource );  DefaultImageReference( final int w, final int h );  DefaultImageReference( final DefaultImageReference parent ); Image getImage(); URL getSourceURL(); String getSourceURLString(); String toString(); ResourceKey getResourceKey(); boolean equals( final Object obj ); int hashCode(); Object clone(); int getImageWidth(); int getImageHeight(); boolean isLoadable(); Object getIdentity(); String getName(); boolean isIdentifiable(); float getScaleX(); float getScaleY(); void setScale( final float sx, final float sy ); }
DefaultImageReference implements Serializable, URLImageContainer, LocalImageContainer { public boolean equals( final Object obj ) { if ( obj == null ) { return false; } if ( obj instanceof DefaultImageReference == false ) { return false; } final DefaultImageReference ref = (DefaultImageReference) obj; if ( ObjectUtilities.equal( String.valueOf( url ), String.valueOf( ref.url ) ) == false ) { return false; } if ( width != ref.width ) { return false; } if ( height != ref.height ) { return false; } if ( scaleX != ref.scaleX ) { return false; } if ( scaleY != ref.scaleY ) { return false; } return true; } DefaultImageReference( final Image img );  DefaultImageReference( final Resource imageResource );  DefaultImageReference( final int w, final int h );  DefaultImageReference( final DefaultImageReference parent ); Image getImage(); URL getSourceURL(); String getSourceURLString(); String toString(); ResourceKey getResourceKey(); boolean equals( final Object obj ); int hashCode(); Object clone(); int getImageWidth(); int getImageHeight(); boolean isLoadable(); Object getIdentity(); String getName(); boolean isIdentifiable(); float getScaleX(); float getScaleY(); void setScale( final float sx, final float sy );  }