org.drools.impl.adapters.CalendarsAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of knowledge-api Show documentation
Show all versions of knowledge-api Show documentation
The Drools and jBPM public API which is backwards compatible between releases.
package org.drools.impl.adapters;
import org.drools.time.Calendar;
import org.kie.api.runtime.Calendars;
public class CalendarsAdapter implements org.drools.runtime.Calendars {
private final Calendars delegate;
public CalendarsAdapter(Calendars delegate) {
this.delegate = delegate;
}
public Calendar get(String identifier) {
return new CalendarAdapter(delegate.get(identifier));
}
@Override
public void set(String identifier, Calendar value) {
delegate.set(identifier, ((CalendarAdapter)value).getDelegate());
}
@Override
public int hashCode() {
return delegate.hashCode();
}
@Override
public boolean equals(Object obj) {
return obj instanceof CalendarsAdapter && delegate.equals(((CalendarsAdapter)obj).delegate);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy