import com.google.common.collect.ImmutableList;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
-
import java.io.Serializable;
import java.util.Collection;
import java.util.Collections;
-
import org.opendaylight.yangtools.concepts.Builder;
import org.opendaylight.yangtools.yang.common.RpcError.ErrorSeverity;
import org.opendaylight.yangtools.yang.common.RpcError.ErrorType;
}
@Override
- public String toString(){
+ public String toString() {
return "RpcResult [successful=" + successful + ", result="
+ result + ", errors=" + errors + "]";
}
}
@Override
- public String getMessage(){
+ public String getMessage() {
return message;
}
}
@Override
- public String toString(){
+ public String toString() {
return "RpcError [message=" + message + ", severity="
+ severity + ", errorType=" + errorType + ", tag=" + tag
+ ", applicationTag=" + applicationTag + ", info=" + info
* @param result the result value
*/
public static <T> RpcResultBuilder<T> success( final T result ) {
- return new RpcResultBuilder<T>( true, result );
+ return new RpcResultBuilder<T>( true, result );
}
/**
private void addError( final RpcError error ) {
- if( errors == null ) {
+ if (errors == null) {
errors = new ImmutableList.Builder<RpcError>();
}
* @param errors the list of RpcErrors
*/
public RpcResultBuilder<T> withRpcErrors( final Collection<RpcError> errors ) {
- if( errors != null ) {
- for( RpcError error: errors ) {
+ if (errors != null) {
+ for (RpcError error : errors) {
addError( error );
}
}