import java.util.HashSet;
import org.tizen.sdblib.IDevice;
-import org.tizen.sdblib.util.ObjectUtil;
+import org.tizen.sdblib.util.CollectionUtil;
/**
* Object to manage application.
public class Application implements IApplication {
/* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ Object[] hashArray = {name, packageId, type, device};
+ return CollectionUtil.hashCode(hashArray);
+ }
+
+ /* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
}
final Application app = (Application)obj;
- return (ObjectUtil.equals(getName(), app.getName())
- && ObjectUtil.equals(getPackageId(), app.getPackageId())
- && ObjectUtil.equals(getType(), app.getType())
- && ObjectUtil.equals(getDevice(), app.getDevice())
- );
+ Object[][] compareArray = {
+ {app.getName(), app.getPackageId(), app.getType(), app.getDevice()}
+ , {name, packageId, type, device}
+ };
+ return CollectionUtil.equals(compareArray);
}
/* (non-Javadoc)