View Javadoc
1   /*
2    * Copyright (C) 2011, 2012 IBM Corporation and others. and others
3    *
4    * This program and the accompanying materials are made available under the
5    * terms of the Eclipse Distribution License v. 1.0 which is available at
6    * https://www.eclipse.org/org/documents/edl-v10.php.
7    *
8    * SPDX-License-Identifier: BSD-3-Clause
9    */
10  package org.eclipse.jgit.api;
11  
12  import java.io.File;
13  import java.util.ArrayList;
14  import java.util.List;
15  
16  /**
17   * Encapsulates the result of a {@link org.eclipse.jgit.api.ApplyCommand}
18   *
19   * @since 2.0
20   */
21  public class ApplyResult {
22  
23  	private List<File> updatedFiles = new ArrayList<>();
24  
25  	/**
26  	 * Add updated file
27  	 *
28  	 * @param f
29  	 *            an updated file
30  	 * @return this instance
31  	 */
32  	public ApplyResult addUpdatedFile(File f) {
33  		updatedFiles.add(f);
34  		return this;
35  
36  	}
37  
38  	/**
39  	 * Get updated files
40  	 *
41  	 * @return updated files
42  	 */
43  	public List<File> getUpdatedFiles() {
44  		return updatedFiles;
45  	}
46  }