org.jclarion.clarion.primative.GlobalStateGetter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clarion-runtime Show documentation
Show all versions of clarion-runtime Show documentation
JClarion runtime environment
The newest version!
package org.jclarion.clarion.primative;
public class GlobalStateGetter extends AbstractStateGetter
{
private T state;
private AbstractStateFactory factory;
public GlobalStateGetter(AbstractStateFactory factory)
{
this.factory=factory;
reset();
}
@Override
public T get() {
return state;
}
@Override
public T get(Thread t) {
return state;
}
@Override
public boolean isThreaded() {
return false;
}
@Override
public AbstractStateGetter getLockedGetter(Thread t) {
return this;
}
@Override
public void reset() {
this.state=factory.createState();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy