package org.drools.impl.adapters;

import org.kie.api.runtime.Environment;

public class EnvironmentAdapter implements org.drools.runtime.Environment {

    public final Environment delegate;

    public EnvironmentAdapter(Environment delegate) {
        this.delegate = delegate;
    }

    public Object get(String identifier) {
        return delegate.get(identifier);
    }

    public void set(String identifier, Object object) {
        delegate.set(identifier, object);
    }

    public void setDelegate(org.drools.runtime.Environment delegate) {
        this.delegate.setDelegate(((EnvironmentAdapter)delegate).delegate);
    }

    public Environment getDelegate() {
        return delegate;
    }
}

@@ -142,16 +142,49 @@
 ironment
+, org.kie.api.runtime.Environment
  %7B%0A%0A    
@@ -502,32 +502,193 @@
 object);%0A    %7D%0A%0A
+    @Override%0A    public void setDelegate(Environment delegate) %7B%0A        setDelegate((org.drools.runtime.Environment) new EnvironmentAdapter(delegate));%0A    %7D%0A%0A
     public void 

make Environment compatible with drools 5 API