org.leialearns.logic.session.SessionAugmenter Maven / Gradle / Ivy
The newest version!
package org.leialearns.logic.session;
import org.leialearns.api.common.NodeDataProxy;
import org.leialearns.api.model.Version;
import org.leialearns.api.model.histogram.Histogram;
import org.leialearns.api.structure.Node;
import org.leialearns.bridge.BridgeOverride;
import org.leialearns.logic.model.HistogramCache;
/**
* Augments {@link org.leialearns.api.session.Session} objects with methods to cache histograms.
*/
public class SessionAugmenter {
private final HistogramCache histogramCache = new HistogramCache();
/*
* See {@link org.leialearns.api.session.Session#putHistogram(Histogram)}.
*/
@BridgeOverride
public void putHistogram(NodeDataProxy histogram) {
histogramCache.putHistogram(histogram);
}
/*
* See {@link org.leialearns.api.session.Session#getHistogram(org.leialearns.api.model.Version, org.leialearns.api.structure.Node)}.
*/
@BridgeOverride
public Histogram getHistogram(Version version, Node node) {
return histogramCache.getHistogram(version, node);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy