選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

ReflogReader.java 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright (C) 2013, Robin Rosenberg <robin.rosenberg@dewire.com> 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.lib;
  11. import java.io.IOException;
  12. import java.util.List;
  13. /**
  14. * Utility for reading reflog entries
  15. *
  16. * @since 3.0
  17. */
  18. public interface ReflogReader {
  19. /**
  20. * Get the last entry in the reflog
  21. *
  22. * @return the latest reflog entry, or null if no log
  23. * @throws java.io.IOException
  24. */
  25. ReflogEntry getLastEntry() throws IOException;
  26. /**
  27. * Get all reflog entries in reverse order
  28. *
  29. * @return all reflog entries in reverse order
  30. * @throws java.io.IOException
  31. */
  32. List<ReflogEntry> getReverseEntries() throws IOException;
  33. /**
  34. * Get specific entry in the reflog relative to the last entry which is
  35. * considered entry zero.
  36. *
  37. * @param number a int.
  38. * @return reflog entry or null if not found
  39. * @throws java.io.IOException
  40. */
  41. ReflogEntry getReverseEntry(int number) throws IOException;
  42. /**
  43. * Get all reflog entries in reverse order
  44. *
  45. * @param max
  46. * max number of entries to read
  47. * @return all reflog entries in reverse order
  48. * @throws java.io.IOException
  49. */
  50. List<ReflogEntry> getReverseEntries(int max) throws IOException;
  51. }