org.ajax4jsf.framework.resource.cached.ResourceBean Maven / Gradle / Ivy
/**
* Licensed under the Common Development and Distribution License,
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.sun.com/cddl/
*
* 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.ajax4jsf.framework.resource.cached;
import java.io.Serializable;
/**
* @author shura
*
*/
public class ResourceBean implements Serializable {
private String key;
/**
* @return the key
*/
public String getKey() {
return key;
}
public Object getData(){
return null;
}
public ResourceBean(String key) {
super();
this.key = key;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals(Object obj) {
if (null != obj && obj instanceof ResourceBean) {
ResourceBean bean = (ResourceBean) obj;
return key.equals(bean.getKey()) && bean.getData() == null;
};
return false;
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
// TODO Auto-generated method stub
return key.hashCode();
}
}