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

jalse.actions.UnmodifiableDelegateActionEngine Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package jalse.actions;

class UnmodifiableDelegateActionEngine implements ActionEngine {

    private final ActionEngine delegate;
    private final UnmodifiableDelegateActionBindings bindings;

    UnmodifiableDelegateActionEngine(final ActionEngine delegate) {
	this.delegate = delegate;
	bindings = new UnmodifiableDelegateActionBindings(delegate != null ? delegate.getBindings() : null);
    }

    @Override
    public MutableActionBindings getBindings() {
	return bindings;
    }

    @Override
    public boolean isPaused() {
	return delegate != null ? delegate.isPaused() : false;
    }

    @Override
    public boolean isStopped() {
	return delegate != null ? delegate.isPaused() : true;
    }

    @Override
    public  MutableActionContext newContext(final Action action) {
	return new UnmodifiableDelegateActionContext<>(delegate != null ? delegate.newContext(action) : null);
    }

    @Override
    public void pause() {
	throw new UnsupportedOperationException();
    }

    @Override
    public void resume() {
	throw new UnsupportedOperationException();
    }

    @Override
    public void stop() {
	throw new UnsupportedOperationException();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy