@Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final CachedResource<T> other = (CachedResource<T>) obj;
            if (this.resource != other.resource && (this.resource == null
                    || !this.resource.equals(other.resource))) {
                return false;
            }
            return true;
        }