refactor: simplify collection.toArray()
[egit/eclipse.git] / org.eclipse.egit.core / src / org / eclipse / egit / core / op / FetchOperationResult.java
blob6a3b19637f982c3433751d6360305dc942d4415f
1 /*******************************************************************************
2 * Copyright (C) 2010, Mathias Kinzler <mathias.kinzler@sap.com>
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License 2.0
6 * which accompanies this distribution, and is available at
7 * https://www.eclipse.org/legal/epl-2.0/
9 * SPDX-License-Identifier: EPL-2.0
10 *******************************************************************************/
11 package org.eclipse.egit.core.op;
13 import org.eclipse.jgit.transport.FetchResult;
14 import org.eclipse.jgit.transport.URIish;
16 /**
17 * Stores the result of a fetch operation
19 public class FetchOperationResult {
20 private final URIish uri;
22 private final FetchResult fetchResult;
24 private final String fetchErrorMessage;
26 /**
27 * @param uri
28 * @param result
30 public FetchOperationResult(URIish uri, FetchResult result) {
31 this.uri = uri;
32 this.fetchResult = result;
33 this.fetchErrorMessage = null;
36 /**
37 * @param uri
38 * @param errorMessage
40 public FetchOperationResult(URIish uri, String errorMessage) {
41 this.uri = uri;
42 this.fetchResult = null;
43 this.fetchErrorMessage = errorMessage;
46 /**
47 * @return the URI
50 public URIish getURI() {
51 return uri;
54 /**
55 * @return the result
57 public FetchResult getFetchResult() {
58 return fetchResult;
61 /**
62 * @return the error message
64 public String getErrorMessage() {
65 return fetchErrorMessage;