com.byoutline.eventcallback.internal.actions.ResultEvents Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eventcallback Show documentation
Show all versions of eventcallback Show documentation
Retrofit callbacks with simpler and shorter syntax.
The newest version!
package com.byoutline.eventcallback.internal.actions;
import com.byoutline.eventcallback.EventCallback;
import com.byoutline.eventcallback.ResponseEvent;
import org.apache.commons.lang3.Validate;
import java.util.ArrayList;
import java.util.List;
/**
* Stores events that can be invoked during {@link EventCallback} onSuccess
* and onError steps.
*
* @author Sebastian Kacprzak
*/
public class ResultEvents extends CreateEvents {
public final List> resultEvents;
public ResultEvents() {
this.resultEvents = new ArrayList>();
}
@Override
void validate() {
super.validate();
Validate.noNullElements(resultEvents);
}
@Override
public String toString() {
return "ResultEvents{" + "resultEvents=" + resultEvents + '}' + super.toString();
}
}