View Javadoc
1   /*
2    * Copyright (C) 2017, Google Inc. 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  
11  package org.eclipse.jgit.internal.storage.reftable;
12  
13  import java.io.IOException;
14  
15  import org.eclipse.jgit.lib.ReflogEntry;
16  
17  /** Empty {@link LogCursor} with no results. */
18  class EmptyLogCursor extends LogCursor {
19  	/** {@inheritDoc} */
20  	@Override
21  	public boolean next() throws IOException {
22  		return false;
23  	}
24  
25  	/** {@inheritDoc} */
26  	@Override
27  	public String getRefName() {
28  		return null;
29  	}
30  
31  	/** {@inheritDoc} */
32  	@Override
33  	public long getUpdateIndex() {
34  		return 0;
35  	}
36  
37  	/** {@inheritDoc} */
38  	@Override
39  	public ReflogEntry getReflogEntry() {
40  		return null;
41  	}
42  
43  	/** {@inheritDoc} */
44  	@Override
45  	public void close() {
46  		// Do nothing.
47  	}
48  }