All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.maxifier.mxcache.impl.resource.MxStaticResource Maven / Gradle / Ivy

/*
 * Copyright (c) 2008-2014 Maxifier Ltd. All Rights Reserved.
 */
package com.maxifier.mxcache.impl.resource;

import javax.annotation.Nonnull;

import java.io.ObjectStreamException;

/**
 * @author Alexander Kochurov ([email protected])
 */
public class MxStaticResource extends MxResourceImpl {
    public MxStaticResource(@Nonnull String name) {
        super(null, name);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        MxStaticResource that = (MxStaticResource) o;

        return getName().equals(that.getName());
    }

    @Override
    public int hashCode() {
        return getName().hashCode();
    }

    private Object writeReplace() throws ObjectStreamException {
        return new MxResourceSerializableImpl(this);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy