javalib.worldimages
Class LooksTheSame

java.lang.Object
  extended by javalib.worldimages.LooksTheSame
All Implemented Interfaces:
tester.Equivalence<WorldImage>

public class LooksTheSame
extends Object
implements tester.Equivalence<WorldImage>

A singleton class to represent the operation of checking whether two images render the same.

Version:
Dec. 31, 2012
Author:
Stephen Bloch

Field Summary
static LooksTheSame it
          The single instance of class LooksTheSame.
 
Method Summary
(package private) static boolean equalBufferedImages(BufferedImage b1, BufferedImage b2)
          Compare two BufferedImages for equal data, the way equals() should have done.
 boolean equivalent(WorldImage t1, WorldImage t2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

it

public static final LooksTheSame it
The single instance of class LooksTheSame.

Method Detail

equalBufferedImages

static boolean equalBufferedImages(BufferedImage b1,
                                   BufferedImage b2)
Compare two BufferedImages for equal data, the way equals() should have done.

Parameters:
b1 - a BufferedImage
b2 - another BufferedImage
Returns:
true if they have the exact same data in their buffers
Since:
29 Dec, 2012

equivalent

public boolean equivalent(WorldImage t1,
                          WorldImage t2)
Specified by:
equivalent in interface tester.Equivalence<WorldImage>