[ERA-CVS] src/org/jdaemon/era Sort.java,1.7,1.8
Brought to you by:
jessex
|
From: <je...@us...> - 2004-07-14 16:12:52
|
Update of /cvsroot/era/src/org/jdaemon/era In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29946 Modified Files: Sort.java Log Message: Fixing various bugs which showed up in unit testing... mostly just implementing sensible equals operators but also a real problem with AbstractReport's constructor not correctly copying the list parameter. Index: Sort.java =================================================================== RCS file: /cvsroot/era/src/org/jdaemon/era/Sort.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Sort.java 13 Jun 2004 10:30:26 -0000 1.7 --- Sort.java 14 Jul 2004 16:12:43 -0000 1.8 *************** *** 35,45 **** this.direction = direction; } ! public int getDirection() { return direction; } public String getAttributeName() { return attribute_name; ! } } --- 35,67 ---- this.direction = direction; } ! ! /** Get direction. ! * ! * @return value of direction property ! */ public int getDirection() { return direction; } + /** Get attribute name. + * + * @return value of attribute name property + */ public String getAttributeName() { return attribute_name; ! } ! ! /** Compare two sort objects. ! * ! * @param objother Sort to compare ! * @returns true if attribute_name and direction are equal in this and other sort. ! */ ! public boolean equals(Object obj) { ! if (obj instanceof Sort) { ! Sort other = (Sort)obj; ! return (this.direction == other.direction && this.attribute_name.equals(other.attribute_name)); ! } else { ! return false; ! } ! } } |