public void addToRecent ( final ExampleData example ) { synchronized ( recent ) { recent . remove ( example ) ; // only add it once recent . add ( 0 , example ) ; // Only keep the last few entries. while ( recent . size ( ) > MAX_RECENT_ITEMS ) { recent . remove ( MAX_RECENT_ITEMS ) ; } storeRecentList ( ) ; setInitialised ( false ) ; } }
Adds an example to the list of recently accessed examples . The list of recently examples will be persisted to the file system .