Verified Owner
Top Description Constructors Methods
org.jabref.model.util

public Class ListUtil

extends Object
Class Inheritance
Imports
java.util.List, java.util.function.Predicate, java.util.stream.Stream, .StreamSupport, org.jabref.model.entry.BibEntry, .LinkedFile

Provides a few helper methods for lists.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static <T> boolean
allMatch(Iterable<T> list, Predicate<T> predicate)

Equivalent to list.stream().allMatch but with slightly better performance (especially for small lists).

public static <T> boolean
anyMatch(Iterable<T> list, Predicate<T> predicate)

Equivalent to list.stream().anyMatch but with slightly better performance (especially for small lists).

public static Stream<LinkedFile>
getLinkedFiles(Iterable<BibEntry> entries)

Extract all LinkedFiles from a list of BibEntrys.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ListUtilback to summary
public ListUtil()

Method Detail

allMatchback to summary
public static <T> boolean allMatch(Iterable<T> list, Predicate<T> predicate)

Equivalent to list.stream().allMatch but with slightly better performance (especially for small lists).

anyMatchback to summary
public static <T> boolean anyMatch(Iterable<T> list, Predicate<T> predicate)

Equivalent to list.stream().anyMatch but with slightly better performance (especially for small lists).

getLinkedFilesback to summary
public static Stream<LinkedFile> getLinkedFiles(Iterable<BibEntry> entries)

Extract all LinkedFiles from a list of BibEntrys. The result is a stream of distinct LinkedFiles.