KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > roller > util > PojoUtil


1 package org.roller.util;
2
3 /**
4  * This class contains helper methods
5  * for Roller pojos (only?)
6 **/

7 public abstract class PojoUtil
8 {
9     public static boolean equals(boolean lEquals, Object JavaDoc a, Object JavaDoc b)
10     {
11         if (a == null)
12         {
13             lEquals = lEquals && (b == null);
14         }
15         else
16         {
17             lEquals = lEquals && a.equals(b);
18         }
19         return lEquals;
20     }
21
22     public static int addHashCode(int result, Object JavaDoc a)
23     {
24         return (37 * result) + ((a != null) ? a.hashCode() : 0);
25     }
26 }
Popular Tags