public class RecentFileList extends java.lang.Object implements java.lang.Iterable<RecentFileList.RecentFile>
Modifier and Type | Class and Description |
---|---|
static class |
RecentFileList.RecentFile |
Modifier and Type | Field and Description |
---|---|
private java.util.LinkedList<RecentFileList.RecentFile> |
list |
private int |
maxItemCount |
Constructor and Description |
---|
RecentFileList() |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String path) |
void |
add(java.lang.String path,
FileType type) |
void |
addToBottom(java.lang.String path,
FileType type) |
void |
clear() |
boolean |
contains(java.lang.String path) |
void |
forEach(java.util.function.Consumer<? super RecentFileList.RecentFile> action) |
java.util.List<RecentFileList.RecentFile> |
getFiles() |
int |
getMaxItemCount() |
int |
indexOf(java.lang.String path) |
java.util.Iterator<RecentFileList.RecentFile> |
iterator() |
void |
load(java.util.prefs.Preferences p) |
static FileType |
parseFileType(java.lang.String type,
java.lang.String path) |
private void |
prepareAdd() |
void |
remove(RecentFileList.RecentFile recentFile) |
void |
remove(java.lang.String path) |
void |
save(java.util.prefs.Preferences p) |
void |
setMaxItemCount(int maxItemCount) |
int |
size() |
java.util.Spliterator<RecentFileList.RecentFile> |
spliterator() |
private java.util.LinkedList<RecentFileList.RecentFile> list
private int maxItemCount
public void add(java.lang.String path)
public void add(java.lang.String path, FileType type)
public void addToBottom(java.lang.String path, FileType type)
public void clear()
public boolean contains(java.lang.String path)
public void forEach(java.util.function.Consumer<? super RecentFileList.RecentFile> action)
forEach
in interface java.lang.Iterable<RecentFileList.RecentFile>
public java.util.List<RecentFileList.RecentFile> getFiles()
public int getMaxItemCount()
public int indexOf(java.lang.String path)
public java.util.Iterator<RecentFileList.RecentFile> iterator()
iterator
in interface java.lang.Iterable<RecentFileList.RecentFile>
public void load(java.util.prefs.Preferences p)
public static FileType parseFileType(java.lang.String type, java.lang.String path)
private void prepareAdd()
public void remove(RecentFileList.RecentFile recentFile)
public void remove(java.lang.String path)
public void save(java.util.prefs.Preferences p)
public void setMaxItemCount(int maxItemCount)
public int size()
public java.util.Spliterator<RecentFileList.RecentFile> spliterator()
spliterator
in interface java.lang.Iterable<RecentFileList.RecentFile>