01: package example;
02:
03: import java.util.List;
04: import java.util.ArrayList;
05:
06: public class MovieFinderImpl implements MovieFinder {
07: private ArrayList<Movie> _list = new ArrayList<Movie>();
08:
09: /**
10: * Adds a movie to the list.
11: */
12: public void addMovie(Movie movie) {
13: _list.add(movie);
14: }
15:
16: /**
17: * Returns all the movies.
18: */
19: public List<Movie> findAll() {
20: return new ArrayList<Movie>(_list);
21: }
22: }
|