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

com.softicar.platform.common.io.resource.hash.AbstractHashableResource Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
package com.softicar.platform.common.io.resource.hash;

import com.softicar.platform.common.io.resource.IResource;
import java.util.Optional;

/**
 * Abstract implementation of {@link IResource#getContentHash()}.
 * 

* The computation of the {@link IResource} content hash is done only on demand * and then cached for consecutive calls. * * @author Oliver Richers */ public abstract class AbstractHashableResource implements IResource { private final LazyResourceHasher hasher; public AbstractHashableResource() { this.hasher = new LazyResourceHasher(this); } @Override public final Optional getContentHash() { return Optional.of(hasher.getHash()); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy