From: <iro...@us...> - 2009-01-26 22:38:53
|
Revision: 91 http://pojomatic.svn.sourceforge.net/pojomatic/?rev=91&view=rev Author: iroberts Date: 2009-01-26 22:03:58 +0000 (Mon, 26 Jan 2009) Log Message: ----------- Implement equals and hashCode (eat our own dogfood) Modified Paths: -------------- trunk/Pojomatic/src/main/java/org/pojomatic/diff/PropertyDifferences.java Modified: trunk/Pojomatic/src/main/java/org/pojomatic/diff/PropertyDifferences.java =================================================================== --- trunk/Pojomatic/src/main/java/org/pojomatic/diff/PropertyDifferences.java 2009-01-26 22:02:07 UTC (rev 90) +++ trunk/Pojomatic/src/main/java/org/pojomatic/diff/PropertyDifferences.java 2009-01-26 22:03:58 UTC (rev 91) @@ -3,7 +3,11 @@ import java.util.Collections; import java.util.List; +import org.pojomatic.Pojomatic; +import org.pojomatic.annotations.Property; + public class PropertyDifferences implements Differences { + @Property private final List<Difference> differences; public PropertyDifferences(List<Difference> differences) { @@ -22,6 +26,9 @@ return differences.isEmpty() ? "no differences" : differences.toString(); } + @Override public boolean equals(Object other) { return Pojomatic.equals(this, other); } + @Override public int hashCode() { return Pojomatic.hashCode(this); } + public boolean areEqual() { return differences.isEmpty(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |