org.jclarion.clarion.primative.LockedStateGetter 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 LockedStateGetter extends AbstractStateGetter
{
private T state;
public LockedStateGetter(T state)
{
this.state=state;
}
@Override
public T get() {
return state;
}
@Override
public T get(Thread t) {
return state;
}
@Override
public boolean isThreaded() {
return true;
}
@Override
public AbstractStateGetter getLockedGetter(Thread t) {
return this;
}
@Override
public void reset() {
throw new IllegalStateException("Cannot reset a locked getter");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy