/*
* Copyright (C) 2013 Fairphone Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.fairphone.launcher.edgeswipe.edit;
import android.graphics.drawable.Drawable;
import android.util.Log;
public class EdgeSwipeApplicationInfo
{
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((appName == null) ? 0 : appName.hashCode());
result = prime * result + ((icon == null) ? 0 : icon.hashCode());
result = prime * result
+ ((packageName == null) ? 0 : packageName.hashCode());
result = prime * result + versionCode;
result = prime * result
+ ((versionName == null) ? 0 : versionName.hashCode());
return result;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
EdgeSwipeApplicationInfo other = (EdgeSwipeApplicationInfo) obj;
if (appName == null) {
if (other.appName != null)
return false;
} else if (!appName.equals(other.appName))
return false;
if (icon == null) {
if (other.icon != null)
return false;
} else if (!icon.equals(other.icon))
return false;
if (packageName == null) {
if (other.packageName != null)
return false;
} else if (!packageName.equals(other.packageName))
return false;
if (versionCode != other.versionCode)
return false;
if (versionName == null) {
if (other.versionName != null)
return false;
} else if (!versionName.equals(other.versionName))
return false;
return true;
}
public String appName = "";
public String packageName = "";
public String versionName = "";
public int versionCode = 0;
public Drawable icon;
public void logPrint()
{
Log.v(EdgeSwipeApplicationInfo.class.getSimpleName(), appName + "\t" + packageName + "\t" + versionName + "\t" + versionCode);
}
}