ApplyResult.java

  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. import java.io.File;
  12. import java.util.ArrayList;
  13. import java.util.List;

  14. /**
  15.  * Encapsulates the result of a {@link org.eclipse.jgit.api.ApplyCommand}
  16.  *
  17.  * @since 2.0
  18.  */
  19. public class ApplyResult {

  20.     private List<File> updatedFiles = new ArrayList<>();

  21.     /**
  22.      * Add updated file
  23.      *
  24.      * @param f
  25.      *            an updated file
  26.      * @return this instance
  27.      */
  28.     public ApplyResult addUpdatedFile(File f) {
  29.         updatedFiles.add(f);
  30.         return this;

  31.     }

  32.     /**
  33.      * Get updated files
  34.      *
  35.      * @return updated files
  36.      */
  37.     public List<File> getUpdatedFiles() {
  38.         return updatedFiles;
  39.     }
  40. }