Verified Owner
Top Fields Constructors Methods
org.jabref.logic.util.io

public Class FileHistory

extends ModifiableObservableListBase<Path>
Class Inheritance
Imports
java.nio.file.Path, java.util.ArrayList, .List, .Objects, javafx.collections.ModifiableObservableListBase, org.jabref.logic.util.JabRefBaseDirectoryLocator, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final List<Path>
private static final int
private static final Logger

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected void
doAdd(int index, Path element)

Implements abstract javafx.collections.ModifiableObservableListBase.doAdd.

Adds the element to the List at the position of index.

protected Path
doRemove(int index)

Implements abstract javafx.collections.ModifiableObservableListBase.doRemove.

Removes the element at position of index.

protected Path
doSet(int index, Path element)

Implements abstract javafx.collections.ModifiableObservableListBase.doSet.

Sets the element in the List at the position of index.

public Path
get(int index)

Implements abstract javafx.collections.ModifiableObservableListBase.get.

Implements java.util.List.get.

Returns the element at the specified position in this list.

public void
newFile(Path file)

Adds the file to the top of the list.

public static FileHistory
of(List<Path> list)

Hides java.util.List.of.

Returns an unmodifiable list containing one element.

public void
public int
size()

Implements abstract javafx.collections.ModifiableObservableListBase.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.

Inherited from javafx.collections.ModifiableObservableListBase:
addaddAlladdAllremoveremoveremoveAllremoveRangereplaceRangeretainAllsetsetAllsubList

Field Detail

historyback to summary
private final List<Path> history
HISTORY_SIZEback to summary
private static final int HISTORY_SIZE
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

FileHistoryback to summary
private FileHistory(List<Path> list)

Method Detail

doAddback to summary
protected void doAdd(int index, Path element)

Implements abstract javafx.collections.ModifiableObservableListBase.doAdd.

Doc from javafx.collections.ModifiableObservableListBase.doAdd.

Adds the element to the List at the position of index.

For the description of possible exceptions, please refer to the documentation of add(java.lang.Object) method.

Annotations
@Override
doRemoveback to summary
protected Path doRemove(int index)

Implements abstract javafx.collections.ModifiableObservableListBase.doRemove.

Doc from javafx.collections.ModifiableObservableListBase.doRemove.

Removes the element at position of index.

Annotations
@Override
doSetback to summary
protected Path doSet(int index, Path element)

Implements abstract javafx.collections.ModifiableObservableListBase.doSet.

Doc from javafx.collections.ModifiableObservableListBase.doSet.

Sets the element in the List at the position of index.

For the description of possible exceptions, please refer to the documentation of set(int, java.lang.Object) method.

Annotations
@Override
getback to summary
public Path get(int index)

Implements abstract javafx.collections.ModifiableObservableListBase.get.

Implements java.util.List.get.

Doc from java.util.List.get.

Returns the element at the specified position in this list.

Annotations
@Override
newFileback to summary
public void newFile(Path file)

Adds the file to the top of the list. If it already is in the list, it is merely moved to the top.

ofback to summary
public static FileHistory of(List<Path> list)

Hides java.util.List.of.

Doc from java.util.List.of.

Returns an unmodifiable list containing one element. See Unmodifiable Lists for details.

removeItemback to summary
public void removeItem(Path file)
sizeback to summary
public int size()

Implements abstract javafx.collections.ModifiableObservableListBase.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.